From 0f32e4b21935f30efa32a0446e4a4c59f4e5fe4d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 27 Mar 2026 01:05:54 +0000 Subject: [PATCH 1/2] feat: add `expiration_offset` to `Field` docs: update documentation for `Field` PiperOrigin-RevId: 890064766 Source-Link: https://github.com/googleapis/googleapis/commit/1161dbcb1c390c7bc0a342d880c9cd7aa7410c8b Source-Link: https://github.com/googleapis/googleapis-gen/commit/f6ea317724056e0ef8ac00f99d5d2eca273f8be9 Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiJmNmVhMzE3NzI0MDU2ZTBlZjhhYzAwZjk5ZDVkMmVjYTI3M2Y4YmU5In0= --- .../Google/Firestore/Admin/V1/Backup.php | 27 + .../Google/Firestore/Admin/V1/Database.php | 29 + .../Google/Firestore/Admin/V1/Field.php | 28 + .../Firestore/Admin/V1/FirestoreAdmin.php | 41 + .../Google/Firestore/Admin/V1/Index.php | 26 + .../Google/Firestore/Admin/V1/Location.php | 24 + .../Google/Firestore/Admin/V1/Operation.php | 29 + .../Firestore/Admin/V1/RealtimeUpdates.php | 24 + .../Google/Firestore/Admin/V1/Schedule.php | 29 + .../Google/Firestore/Admin/V1/Snapshot.php | 27 + .../Google/Firestore/Admin/V1/UserCreds.php | 27 + .../Cloud/Firestore/Admin/V1/Backup.php | 327 ++ .../Cloud/Firestore/Admin/V1/Backup/State.php | 69 + .../Cloud/Firestore/Admin/V1/Backup/Stats.php | 139 + .../Firestore/Admin/V1/BackupSchedule.php | 316 ++ .../Admin/V1/BulkDeleteDocumentsMetadata.php | 373 +++ .../Admin/V1/BulkDeleteDocumentsRequest.php | 193 ++ .../Admin/V1/BulkDeleteDocumentsResponse.php | 34 + .../Admin/V1/CloneDatabaseMetadata.php | 278 ++ .../Admin/V1/CloneDatabaseRequest.php | 284 ++ .../Admin/V1/CreateBackupScheduleRequest.php | 134 + .../Admin/V1/CreateDatabaseMetadata.php | 33 + .../Admin/V1/CreateDatabaseRequest.php | 196 ++ .../Firestore/Admin/V1/CreateIndexRequest.php | 133 + .../Admin/V1/CreateUserCredsRequest.php | 190 ++ .../Firestore/Admin/V1/DailyRecurrence.php | 34 + .../Cloud/Firestore/Admin/V1/Database.php | 1125 +++++++ .../V1/Database/AppEngineIntegrationMode.php | 66 + .../Admin/V1/Database/CmekConfig.php | 151 + .../Admin/V1/Database/ConcurrencyMode.php | 78 + .../Admin/V1/Database/DataAccessMode.php | 61 + .../Admin/V1/Database/DatabaseEdition.php | 62 + .../Admin/V1/Database/DatabaseType.php | 64 + .../V1/Database/DeleteProtectionState.php | 61 + .../Admin/V1/Database/EncryptionConfig.php | 144 + .../CustomerManagedEncryptionOptions.php | 96 + .../GoogleDefaultEncryptionOptions.php | 33 + .../SourceEncryptionOptions.php | 34 + .../PointInTimeRecoveryEnablement.php | 67 + .../Admin/V1/Database/SourceInfo.php | 120 + .../V1/Database/SourceInfo/BackupSource.php | 75 + .../Admin/V1/DeleteBackupRequest.php | 88 + .../Admin/V1/DeleteBackupScheduleRequest.php | 92 + .../Admin/V1/DeleteDatabaseMetadata.php | 33 + .../Admin/V1/DeleteDatabaseRequest.php | 129 + .../Firestore/Admin/V1/DeleteIndexRequest.php | 87 + .../Admin/V1/DeleteUserCredsRequest.php | 87 + .../Admin/V1/DisableUserCredsRequest.php | 87 + .../Admin/V1/EnableUserCredsRequest.php | 87 + .../Admin/V1/ExportDocumentsMetadata.php | 403 +++ .../Admin/V1/ExportDocumentsRequest.php | 305 ++ .../Admin/V1/ExportDocumentsResponse.php | 76 + .../Google/Cloud/Firestore/Admin/V1/Field.php | 253 ++ .../Firestore/Admin/V1/Field/IndexConfig.php | 205 ++ .../Firestore/Admin/V1/Field/TtlConfig.php | 140 + .../Admin/V1/Field/TtlConfig/State.php | 75 + .../Admin/V1/FieldOperationMetadata.php | 373 +++ .../IndexConfigDelta.php | 111 + .../IndexConfigDelta/ChangeType.php | 61 + .../FieldOperationMetadata/TtlConfigDelta.php | 115 + .../TtlConfigDelta/ChangeType.php | 61 + .../Firestore/Admin/V1/GetBackupRequest.php | 88 + .../Admin/V1/GetBackupScheduleRequest.php | 93 + .../Firestore/Admin/V1/GetDatabaseRequest.php | 87 + .../Firestore/Admin/V1/GetFieldRequest.php | 87 + .../Firestore/Admin/V1/GetIndexRequest.php | 87 + .../Admin/V1/GetUserCredsRequest.php | 87 + .../Admin/V1/ImportDocumentsMetadata.php | 351 ++ .../Admin/V1/ImportDocumentsRequest.php | 229 ++ .../Google/Cloud/Firestore/Admin/V1/Index.php | 432 +++ .../Firestore/Admin/V1/Index/ApiScope.php | 63 + .../Firestore/Admin/V1/Index/Density.php | 109 + .../Firestore/Admin/V1/Index/IndexField.php | 191 ++ .../Admin/V1/Index/IndexField/ArrayConfig.php | 54 + .../Admin/V1/Index/IndexField/Order.php | 61 + .../V1/Index/IndexField/VectorConfig.php | 117 + .../IndexField/VectorConfig/FlatIndex.php | 34 + .../Firestore/Admin/V1/Index/QueryScope.php | 74 + .../Cloud/Firestore/Admin/V1/Index/State.php | 83 + .../Admin/V1/IndexOperationMetadata.php | 287 ++ .../Admin/V1/ListBackupSchedulesRequest.php | 88 + .../Admin/V1/ListBackupSchedulesResponse.php | 68 + .../Firestore/Admin/V1/ListBackupsRequest.php | 169 + .../Admin/V1/ListBackupsResponse.php | 118 + .../Admin/V1/ListDatabasesRequest.php | 120 + .../Admin/V1/ListDatabasesResponse.php | 129 + .../Firestore/Admin/V1/ListFieldsRequest.php | 221 ++ .../Firestore/Admin/V1/ListFieldsResponse.php | 106 + .../Firestore/Admin/V1/ListIndexesRequest.php | 197 ++ .../Admin/V1/ListIndexesResponse.php | 106 + .../Admin/V1/ListUserCredsRequest.php | 87 + .../Admin/V1/ListUserCredsResponse.php | 68 + .../Firestore/Admin/V1/LocationMetadata.php | 34 + .../Firestore/Admin/V1/OperationState.php | 98 + .../Cloud/Firestore/Admin/V1/PitrSnapshot.php | 153 + .../Cloud/Firestore/Admin/V1/Progress.php | 103 + .../Admin/V1/RealtimeUpdatesMode.php | 62 + .../Admin/V1/ResetUserPasswordRequest.php | 87 + .../Admin/V1/RestoreDatabaseMetadata.php | 268 ++ .../Admin/V1/RestoreDatabaseRequest.php | 278 ++ .../Admin/V1/UpdateBackupScheduleRequest.php | 137 + .../Admin/V1/UpdateDatabaseMetadata.php | 33 + .../Admin/V1/UpdateDatabaseRequest.php | 137 + .../Firestore/Admin/V1/UpdateFieldRequest.php | 139 + .../Cloud/Firestore/Admin/V1/UserCreds.php | 281 ++ .../Admin/V1/UserCreds/ResourceIdentity.php | 71 + .../Firestore/Admin/V1/UserCreds/State.php | 61 + .../Firestore/Admin/V1/WeeklyRecurrence.php | 72 + .../bulk_delete_documents.php | 91 + .../FirestoreAdminClient/clone_database.php | 125 + .../create_backup_schedule.php | 77 + .../FirestoreAdminClient/create_database.php | 96 + .../V1/FirestoreAdminClient/create_index.php | 94 + .../create_user_creds.php | 82 + .../V1/FirestoreAdminClient/delete_backup.php | 71 + .../delete_backup_schedule.php | 76 + .../FirestoreAdminClient/delete_database.php | 84 + .../V1/FirestoreAdminClient/delete_index.php | 75 + .../delete_user_creds.php | 70 + .../disable_user_creds.php | 72 + .../enable_user_creds.php | 72 + .../FirestoreAdminClient/export_documents.php | 94 + .../V1/FirestoreAdminClient/get_backup.php | 73 + .../get_backup_schedule.php | 78 + .../V1/FirestoreAdminClient/get_database.php | 72 + .../V1/FirestoreAdminClient/get_field.php | 77 + .../V1/FirestoreAdminClient/get_index.php | 77 + .../FirestoreAdminClient/get_user_creds.php | 73 + .../FirestoreAdminClient/import_documents.php | 85 + .../list_backup_schedules.php | 73 + .../V1/FirestoreAdminClient/list_backups.php | 76 + .../FirestoreAdminClient/list_databases.php | 72 + .../V1/FirestoreAdminClient/list_fields.php | 89 + .../V1/FirestoreAdminClient/list_indexes.php | 81 + .../FirestoreAdminClient/list_user_creds.php | 73 + .../reset_user_password.php | 72 + .../FirestoreAdminClient/restore_database.php | 124 + .../update_backup_schedule.php | 59 + .../FirestoreAdminClient/update_database.php | 71 + .../V1/FirestoreAdminClient/update_field.php | 122 + .../src/V1/Client/FirestoreAdminClient.php | 1473 ++++++++ .../v1/Admin/src/V1/gapic_metadata.json | 178 + .../firestore_admin_client_config.json | 226 ++ .../firestore_admin_descriptor_config.php | 523 +++ .../firestore_admin_rest_client_config.php | 452 +++ .../V1/Client/FirestoreAdminClientTest.php | 2977 +++++++++++++++++ .../Google/Firestore/V1/AggregationResult.php | 25 + .../Google/Firestore/V1/BloomFilter.php | 24 + .../Google/Firestore/V1/Common.php | 25 + .../Google/Firestore/V1/Document.php | 28 + .../Google/Firestore/V1/ExplainStats.php | 25 + .../Google/Firestore/V1/Firestore.php | 40 + .../Google/Firestore/V1/Pipeline.php | 26 + .../GPBMetadata/Google/Firestore/V1/Query.php | 27 + .../Google/Firestore/V1/QueryProfile.php | 27 + .../GPBMetadata/Google/Firestore/V1/Write.php | 28 + .../Cloud/Firestore/V1/AggregationResult.php | 86 + .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 + .../Firestore/V1/BatchGetDocumentsRequest.php | 296 ++ .../V1/BatchGetDocumentsResponse.php | 214 ++ .../Cloud/Firestore/V1/BatchWriteRequest.php | 152 + .../Cloud/Firestore/V1/BatchWriteResponse.php | 118 + .../Firestore/V1/BeginTransactionRequest.php | 134 + .../Firestore/V1/BeginTransactionResponse.php | 68 + .../Google/Cloud/Firestore/V1/BitSequence.php | 124 + .../Google/Cloud/Firestore/V1/BloomFilter.php | 119 + .../Cloud/Firestore/V1/CommitRequest.php | 161 + .../Cloud/Firestore/V1/CommitResponse.php | 123 + .../Firestore/V1/CreateDocumentRequest.php | 248 ++ .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 + .../Firestore/V1/DeleteDocumentRequest.php | 134 + .../Google/Cloud/Firestore/V1/Document.php | 290 ++ .../Cloud/Firestore/V1/DocumentChange.php | 154 + .../Cloud/Firestore/V1/DocumentDelete.php | 158 + .../Cloud/Firestore/V1/DocumentMask.php | 80 + .../Cloud/Firestore/V1/DocumentRemove.php | 160 + .../Cloud/Firestore/V1/DocumentTransform.php | 109 + .../V1/DocumentTransform/FieldTransform.php | 414 +++ .../FieldTransform/ServerValue.php | 56 + .../Firestore/V1/ExecutePipelineRequest.php | 240 ++ .../Firestore/V1/ExecutePipelineResponse.php | 285 ++ .../Cloud/Firestore/V1/ExecutionStats.php | 237 ++ .../Cloud/Firestore/V1/ExistenceFilter.php | 209 ++ .../Cloud/Firestore/V1/ExplainMetrics.php | 129 + .../Cloud/Firestore/V1/ExplainOptions.php | 83 + .../Cloud/Firestore/V1/ExplainStats.php | 87 + .../Cloud/Firestore/V1/GetDocumentRequest.php | 208 ++ .../Firestore/V1/ListCollectionIdsRequest.php | 219 ++ .../V1/ListCollectionIdsResponse.php | 102 + .../Firestore/V1/ListDocumentsRequest.php | 462 +++ .../Firestore/V1/ListDocumentsResponse.php | 106 + .../Cloud/Firestore/V1/ListenRequest.php | 180 + .../Cloud/Firestore/V1/ListenResponse.php | 219 ++ .../Google/Cloud/Firestore/V1/MapValue.php | 83 + .../Google/Cloud/Firestore/V1/PBFunction.php | 149 + .../Firestore/V1/PartitionQueryRequest.php | 364 ++ .../Firestore/V1/PartitionQueryResponse.php | 162 + .../Google/Cloud/Firestore/V1/Pipeline.php | 67 + .../Cloud/Firestore/V1/Pipeline/Stage.php | 157 + .../Google/Cloud/Firestore/V1/PlanSummary.php | 83 + .../Cloud/Firestore/V1/Precondition.php | 114 + .../Cloud/Firestore/V1/RollbackRequest.php | 121 + .../V1/RunAggregationQueryRequest.php | 304 ++ .../V1/RunAggregationQueryResponse.php | 244 ++ .../Cloud/Firestore/V1/RunQueryRequest.php | 306 ++ .../Cloud/Firestore/V1/RunQueryResponse.php | 327 ++ .../V1/StructuredAggregationQuery.php | 122 + .../Aggregation.php | 287 ++ .../Aggregation/Avg.php | 83 + .../Aggregation/Count.php | 166 + .../Aggregation/Sum.php | 92 + .../Cloud/Firestore/V1/StructuredPipeline.php | 114 + .../Cloud/Firestore/V1/StructuredQuery.php | 652 ++++ .../V1/StructuredQuery/CollectionSelector.php | 113 + .../V1/StructuredQuery/CompositeFilter.php | 109 + .../CompositeFilter/Operator.php | 65 + .../V1/StructuredQuery/Direction.php | 61 + .../V1/StructuredQuery/FieldFilter.php | 155 + .../StructuredQuery/FieldFilter/Operator.php | 143 + .../V1/StructuredQuery/FieldReference.php | 83 + .../Firestore/V1/StructuredQuery/Filter.php | 141 + .../V1/StructuredQuery/FindNearest.php | 396 +++ .../FindNearest/DistanceMeasure.php | 80 + .../Firestore/V1/StructuredQuery/Order.php | 111 + .../V1/StructuredQuery/Projection.php | 75 + .../V1/StructuredQuery/UnaryFilter.php | 109 + .../StructuredQuery/UnaryFilter/Operator.php | 81 + .../src/Google/Cloud/Firestore/V1/Target.php | 407 +++ .../Firestore/V1/Target/DocumentsTarget.php | 79 + .../Cloud/Firestore/V1/Target/QueryTarget.php | 129 + .../Cloud/Firestore/V1/TargetChange.php | 267 ++ .../V1/TargetChange/TargetChangeType.php | 83 + .../Cloud/Firestore/V1/TransactionOptions.php | 108 + .../V1/TransactionOptions/PBReadOnly.php | 84 + .../V1/TransactionOptions/ReadWrite.php | 69 + .../Firestore/V1/UpdateDocumentRequest.php | 268 ++ .../src/Google/Cloud/Firestore/V1/Value.php | 603 ++++ .../src/Google/Cloud/Firestore/V1/Write.php | 314 ++ .../Cloud/Firestore/V1/WriteRequest.php | 277 ++ .../Cloud/Firestore/V1/WriteResponse.php | 203 ++ .../Google/Cloud/Firestore/V1/WriteResult.php | 131 + .../FirestoreClient/batch_get_documents.php | 86 + .../V1/FirestoreClient/batch_write.php | 66 + .../V1/FirestoreClient/begin_transaction.php | 71 + .../v1/samples/V1/FirestoreClient/commit.php | 74 + .../V1/FirestoreClient/create_document.php | 83 + .../V1/FirestoreClient/delete_document.php | 69 + .../V1/FirestoreClient/execute_pipeline.php | 76 + .../V1/FirestoreClient/get_document.php | 71 + .../FirestoreClient/list_collection_ids.php | 77 + .../V1/FirestoreClient/list_documents.php | 89 + .../v1/samples/V1/FirestoreClient/listen.php | 78 + .../V1/FirestoreClient/partition_query.php | 64 + .../samples/V1/FirestoreClient/rollback.php | 72 + .../FirestoreClient/run_aggregation_query.php | 92 + .../samples/V1/FirestoreClient/run_query.php | 80 + .../V1/FirestoreClient/update_document.php | 62 + .../v1/samples/V1/FirestoreClient/write.php | 79 + .../v1/src/V1/Client/FirestoreClient.php | 662 ++++ .../Firestore/v1/src/V1/gapic_metadata.json | 103 + .../V1/resources/firestore_client_config.json | 176 + .../resources/firestore_descriptor_config.php | 295 ++ .../firestore_rest_client_config.php | 304 ++ .../Unit/V1/Client/FirestoreClientTest.php | 1405 ++++++++ 264 files changed, 42303 insertions(+) create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php new file mode 100644 index 000000000000..7863bdb50960 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC7\x07\x0A&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE0\x04\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x08database\x18\x02 \x01(\x09B)\xE0A\x03\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x07 \x01(\x09B\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x05stats\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.Backup.StatsB\x03\xE0A\x03\x12;\x0A\x05state\x18\x08 \x01(\x0E2'.google.firestore.admin.v1.Backup.StateB\x03\xE0A\x03\x1AW\x0A\x05Stats\x12\x17\x0A\x0Asize_bytes\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x1B\x0A\x0Edocument_count\x18\x02 \x01(\x03B\x03\xE0A\x03\x12\x18\x0A\x0Bindex_count\x18\x03 \x01(\x03B\x03\xE0A\x03\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x11\x0A\x0DNOT_AVAILABLE\x10\x03:^\xEAA[\x0A\x1Ffirestore.googleapis.com/Backup\x128projects/{project}/locations/{location}/backups/{backup}B\xDA\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0BBackupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php new file mode 100644 index 000000000000..7e56dd37b714 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xCF\x1D\x0A(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A0google/firestore/admin/v1/realtime_updates.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAB\x19\x0A\x08Database\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03uid\x18\x03 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x0Blocation_id\x18\x09 \x01(\x09\x12>\x0A\x04type\x18\x0A \x01(\x0E20.google.firestore.admin.v1.Database.DatabaseType\x12M\x0A\x10concurrency_mode\x18\x0F \x01(\x0E23.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\x0A\x18version_retention_period\x18\x11 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x03\x12>\x0A\x15earliest_version_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12l\x0A!point_in_time_recovery_enablement\x18\x15 \x01(\x0E2A.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12a\x0A\x1Bapp_engine_integration_mode\x18\x13 \x01(\x0E2<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\x0A\x0Akey_prefix\x18\x14 \x01(\x09B\x03\xE0A\x03\x12Z\x0A\x17delete_protection_state\x18\x16 \x01(\x0E29.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\x0A\x0Bcmek_config\x18\x17 \x01(\x0B2..google.firestore.admin.v1.Database.CmekConfigB\x03\xE0A\x01\x12\x18\x0A\x0Bprevious_id\x18\x19 \x01(\x09B\x03\xE0A\x03\x12H\x0A\x0Bsource_info\x18\x1A \x01(\x0B2..google.firestore.admin.v1.Database.SourceInfoB\x03\xE0A\x03\x12F\x0A\x04tags\x18\x1D \x03(\x0B2-.google.firestore.admin.v1.Database.TagsEntryB\x09\xE0A\x04\xE0A\x05\xE0A\x01\x12\x1B\x0A\x09free_tier\x18\x1E \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x0C\x0A\x04etag\x18c \x01(\x09\x12R\x0A\x10database_edition\x18\x1C \x01(\x0E23.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xE0A\x05\x12R\x0A\x15realtime_updates_mode\x18\x1F \x01(\x0E2..google.firestore.admin.v1.RealtimeUpdatesModeB\x03\xE0A\x05\x12[\x0A\x1Afirestore_data_access_mode\x18! \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x12d\x0A#mongodb_compatible_data_access_mode\x18\" \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x1AH\x0A\x0ACmekConfig\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1F\x0A\x12active_key_version\x18\x02 \x03(\x09B\x03\xE0A\x03\x1A\xE7\x01\x0A\x0ASourceInfo\x12M\x0A\x06backup\x18\x01 \x01(\x0B2;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\x0A\x09operation\x18\x03 \x01(\x09B'\xFAA\$\x0A\"firestore.googleapis.com/Operation\x1AD\x0A\x0CBackupSource\x124\x0A\x06backup\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/BackupB\x08\x0A\x06source\x1A\x88\x04\x0A\x10EncryptionConfig\x12x\x0A\x19google_default_encryption\x18\x01 \x01(\x0B2S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\x0A\x15use_source_encryption\x18\x02 \x01(\x0B2L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\x0A\x1Bcustomer_managed_encryption\x18\x03 \x01(\x0B2U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1A \x0A\x1EGoogleDefaultEncryptionOptions\x1A\x19\x0A\x17SourceEncryptionOptions\x1A=\x0A CustomerManagedEncryptionOptions\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x11\x0A\x0Fencryption_type\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"W\x0A\x0CDatabaseType\x12\x1D\x0A\x19DATABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10FIRESTORE_NATIVE\x10\x01\x12\x12\x0A\x0EDATASTORE_MODE\x10\x02\"w\x0A\x0FConcurrencyMode\x12 \x0A\x1CCONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AOPTIMISTIC\x10\x01\x12\x0F\x0A\x0BPESSIMISTIC\x10\x02\x12!\x0A\x1DOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9B\x01\x0A\x1DPointInTimeRecoveryEnablement\x121\x0A-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\x0A\x1EPOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\x0A\x1FPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\x0A\x18AppEngineIntegrationMode\x12+\x0A'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\"\x7F\x0A\x15DeleteProtectionState\x12'\x0A#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ADELETE_PROTECTION_DISABLED\x10\x01\x12\x1D\x0A\x19DELETE_PROTECTION_ENABLED\x10\x02\"Q\x0A\x0FDatabaseEdition\x12 \x0A\x1CDATABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\"o\x0A\x0EDataAccessMode\x12 \x0A\x1CDATA_ACCESS_MODE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18DATA_ACCESS_MODE_ENABLED\x10\x01\x12\x1D\x0A\x19DATA_ACCESS_MODE_DISABLED\x10\x02:R\xEAAO\x0A!firestore.googleapis.com/Database\x12'projects/{project}/databases/{database}R\x01\x01B\x0C\x0A\x0A_free_tierB\xC3\x02\x0A\x1Dcom.google.firestore.admin.v1B\x0DDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAd\x0A\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php new file mode 100644 index 000000000000..bdfc8da72b88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x8B\x08\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\x1A\x1Egoogle/protobuf/duration.proto\"\x80\x05\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\xD8\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\x129\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php new file mode 100644 index 000000000000..4958902fc482 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + "\x0A\xB3`\x0A/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x18google/api/routing.proto\x1A&google/firestore/admin/v1/backup.proto\x1A(google/firestore/admin/v1/database.proto\x1A%google/firestore/admin/v1/field.proto\x1A%google/firestore/admin/v1/index.proto\x1A)google/firestore/admin/v1/operation.proto\x1A(google/firestore/admin/v1/schedule.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A*google/firestore/admin/v1/user_creds.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"g\x0A\x14ListDatabasesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x14\x0A\x0Cshow_deleted\x18\x04 \x01(\x08\"\xA8\x01\x0A\x15CreateDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12:\x0A\x08database\x18\x02 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12\x18\x0A\x0Bdatabase_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x18\x0A\x16CreateDatabaseMetadata\"d\x0A\x15ListDatabasesResponse\x126\x0A\x09databases\x18\x01 \x03(\x0B2#.google.firestore.admin.v1.Database\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"M\x0A\x12GetDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"\x84\x01\x0A\x15UpdateDatabaseRequest\x12:\x0A\x08database\x18\x01 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x18\x0A\x16UpdateDatabaseMetadata\"^\x0A\x15DeleteDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\"\x18\x0A\x16DeleteDatabaseMetadata\"\xAF\x01\x0A\x16CreateUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\x12=\x0A\x0Auser_creds\x18\x02 \x01(\x0B2\$.google.firestore.admin.v1.UserCredsB\x03\xE0A\x02\x12\x1A\x0A\x0Duser_creds_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"O\x0A\x13GetUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x14ListUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\"Q\x0A\x15ListUserCredsResponse\x128\x0A\x0Auser_creds\x18\x01 \x03(\x0B2\$.google.firestore.admin.v1.UserCreds\"R\x0A\x16EnableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"S\x0A\x17DisableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"T\x0A\x18ResetUserPasswordRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x16DeleteUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"\xA1\x01\x0A\x1BCreateBackupScheduleRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12G\x0A\x0Fbackup_schedule\x18\x02 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\"Y\x0A\x18GetBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x97\x01\x0A\x1BUpdateBackupScheduleRequest\x12G\x0A\x0Fbackup_schedule\x18\x01 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"W\x0A\x1AListBackupSchedulesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"b\x0A\x1BListBackupSchedulesResponse\x12C\x0A\x10backup_schedules\x18\x01 \x03(\x0B2).google.firestore.admin.v1.BackupSchedule\"\\\x0A\x1BDeleteBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x8C\x01\x0A\x12CreateIndexRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x124\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.IndexB\x03\xE0A\x02\"\x8D\x01\x0A\x12ListIndexesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"a\x0A\x13ListIndexesResponse\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"G\x0A\x0FGetIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"J\x0A\x12DeleteIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"{\x0A\x12UpdateFieldRequest\x124\x0A\x05field\x18\x01 \x01(\x0B2 .google.firestore.admin.v1.FieldB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"G\x0A\x0FGetFieldRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Field\"\x8C\x01\x0A\x11ListFieldsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"_\x0A\x12ListFieldsResponse\x120\x0A\x06fields\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Field\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCE\x01\x0A\x16ExportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x9A\x01\x0A\x16ImportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\"\x8E\x01\x0A\x1ABulkDeleteDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x1B\x0A\x0Ecollection_ids\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dnamespace_ids\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x1D\x0A\x1BBulkDeleteDocumentsResponse\"I\x0A\x10GetBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"_\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Location\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\"^\x0A\x13ListBackupsResponse\x122\x0A\x07backups\x18\x01 \x03(\x0B2!.google.firestore.admin.v1.Backup\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x13DeleteBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"\xFC\x02\x0A\x16RestoreDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x06backup\x18\x03 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12T\x0A\x11encryption_config\x18\x09 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12Q\x0A\x04tags\x18\x0A \x03(\x0B2;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x84\x03\x0A\x14CloneDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Dpitr_snapshot\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshotB\x03\xE0A\x02\x12T\x0A\x11encryption_config\x18\x04 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12O\x0A\x04tags\x18\x05 \x03(\x0B29.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x012\xFB1\x0A\x0EFirestoreAdmin\x12\xDB\x01\x0A\x0BCreateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1F\x0A\x05Index\x12\x16IndexOperationMetadata\xDAA\x0Cparent,index\x82\xD3\xE4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xBD\x01\x0A\x0BListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1A..google.firestore.admin.v1.ListIndexesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xA7\x01\x0A\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1A .google.firestore.admin.v1.Index\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA3\x01\x0A\x0BDeleteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA6\x01\x0A\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1A .google.firestore.admin.v1.Field\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xD9\x01\x0A\x0BUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1F\x0A\x05Field\x12\x16FieldOperationMetadata\xDAA\x05field\x82\xD3\xE4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05field\x12\xB9\x01\x0A\x0AListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1A-.google.firestore.admin.v1.ListFieldsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xDD\x01\x0A\x0FExportDocuments\x121.google.firestore.admin.v1.ExportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA2\x0A\x17ExportDocumentsResponse\x12\x17ExportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xDB\x01\x0A\x0FImportDocuments\x121.google.firestore.admin.v1.ImportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA0\x0A\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xF2\x01\x0A\x13BulkDeleteDocuments\x125.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA:\x0A\x1BBulkDeleteDocumentsResponse\x12\x1BBulkDeleteDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xD9\x01\x0A\x0ECreateDatabase\x120.google.firestore.admin.v1.CreateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA\"\x0A\x08Database\x12\x16CreateDatabaseMetadata\xDAA\x1Bparent,database,database_id\x82\xD3\xE4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08database\x12\x93\x01\x0A\x0BGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1A#.google.firestore.admin.v1.Database\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xA6\x01\x0A\x0DListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1A0.google.firestore.admin.v1.ListDatabasesResponse\"2\xDAA\x06parent\x82\xD3\xE4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xDB\x01\x0A\x0EUpdateDatabase\x120.google.firestore.admin.v1.UpdateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\"\x0A\x08Database\x12\x16UpdateDatabaseMetadata\xDAA\x14database,update_mask\x82\xD3\xE4\x93\x0262*/v1/{database.name=projects/*/databases/*}:\x08database\x12\xB8\x01\x0A\x0EDeleteDatabase\x120.google.firestore.admin.v1.DeleteDatabaseRequest\x1A\x1D.google.longrunning.Operation\"U\xCAA\"\x0A\x08Database\x12\x16DeleteDatabaseMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xCF\x01\x0A\x0FCreateUserCreds\x121.google.firestore.admin.v1.CreateUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"c\xDAA\x1Fparent,user_creds,user_creds_id\x82\xD3\xE4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\x0Auser_creds\x12\xA2\x01\x0A\x0CGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xB2\x01\x0A\x0DListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1A0.google.firestore.admin.v1.ListUserCredsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xB2\x01\x0A\x0FEnableUserCreds\x121.google.firestore.admin.v1.EnableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xB5\x01\x0A\x10DisableUserCreds\x122.google.firestore.admin.v1.DisableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xBD\x01\x0A\x11ResetUserPassword\x123.google.firestore.admin.v1.ResetUserPasswordRequest\x1A\$.google.firestore.admin.v1.UserCreds\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9A\x01\x0A\x0FDeleteUserCreds\x121.google.firestore.admin.v1.DeleteUserCredsRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\x0A\x09GetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1A!.google.firestore.admin.v1.Backup\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xAA\x01\x0A\x0BListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1A..google.firestore.admin.v1.ListBackupsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\x0A\x0CDeleteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xBF\x01\x0A\x0FRestoreDatabase\x121.google.firestore.admin.v1.RestoreDatabaseRequest\x1A\x1D.google.longrunning.Operation\"Z\xCAA#\x0A\x08Database\x12\x17RestoreDatabaseMetadata\x82\xD3\xE4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xE0\x01\x0A\x14CreateBackupSchedule\x126.google.firestore.admin.v1.CreateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"e\xDAA\x16parent,backup_schedule\x82\xD3\xE4\x93\x02F\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0Fbackup_schedule\x12\xB7\x01\x0A\x11GetBackupSchedule\x123.google.firestore.admin.v1.GetBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"B\xDAA\x04name\x82\xD3\xE4\x93\x025\x123/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xCA\x01\x0A\x13ListBackupSchedules\x125.google.firestore.admin.v1.ListBackupSchedulesRequest\x1A6.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xDAA\x06parent\x82\xD3\xE4\x93\x025\x123/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xF5\x01\x0A\x14UpdateBackupSchedule\x126.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"z\xDAA\x1Bbackup_schedule,update_mask\x82\xD3\xE4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0Fbackup_schedule\x12\xAA\x01\x0A\x14DeleteBackupSchedule\x126.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1A\x16.google.protobuf.Empty\"B\xDAA\x04name\x82\xD3\xE4\x93\x025*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xB7\x02\x0A\x0DCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1A\x1D.google.longrunning.Operation\"\xD5\x01\xCAA!\x0A\x08Database\x12\x15CloneDatabaseMetadata\x82\xD3\xE4\x93\x02,\"'/v1/{parent=projects/*}/databases:clone:\x01*\x8A\xD3\xE4\x93\x02y\x124\x0A\x16pitr_snapshot.database\x12\x1Aprojects/{project_id=*}/**\x12A\x0A\x16pitr_snapshot.database\x12'projects/*/databases/{database_id=*}/**\x1Av\xCAA\x18firestore.googleapis.com\xD2AXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xA5\x03\x0A\x1Dcom.google.firestore.admin.v1B\x13FirestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAL\x0A!firestore.googleapis.com/Location\x12'projects/{project}/locations/{location}\xEAAq\x0A(firestore.googleapis.com/CollectionGroup\x12Eprojects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php new file mode 100644 index 000000000000..7832c5a6f905 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xC6\x0D\x0A%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\"\x82\x0B\x0A\x05Index\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12@\x0A\x0Bquery_scope\x18\x02 \x01(\x0E2+.google.firestore.admin.v1.Index.QueryScope\x12<\x0A\x09api_scope\x18\x05 \x01(\x0E2).google.firestore.admin.v1.Index.ApiScope\x12;\x0A\x06fields\x18\x03 \x03(\x0B2+.google.firestore.admin.v1.Index.IndexField\x125\x0A\x05state\x18\x04 \x01(\x0E2&.google.firestore.admin.v1.Index.State\x12>\x0A\x07density\x18\x06 \x01(\x0E2(.google.firestore.admin.v1.Index.DensityB\x03\xE0A\x05\x12\x15\x0A\x08multikey\x18\x07 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Bshard_count\x18\x08 \x01(\x05B\x03\xE0A\x01\x12\x13\x0A\x06unique\x18\x0A \x01(\x08B\x03\xE0A\x01\x1A\xA2\x04\x0A\x0AIndexField\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12B\x0A\x05order\x18\x02 \x01(\x0E21.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\x0A\x0Carray_config\x18\x03 \x01(\x0E27.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\x0A\x0Dvector_config\x18\x04 \x01(\x0B28.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1A\x8F\x01\x0A\x0CVectorConfig\x12\x16\x0A\x09dimension\x18\x01 \x01(\x05B\x03\xE0A\x02\x12R\x0A\x04flat\x18\x02 \x01(\x0B2B.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1A\x0B\x0A\x09FlatIndexB\x06\x0A\x04type\"=\x0A\x05Order\x12\x15\x0A\x11ORDER_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"9\x0A\x0BArrayConfig\x12\x1C\x0A\x18ARRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CONTAINS\x10\x01B\x0C\x0A\x0Avalue_mode\"i\x0A\x0AQueryScope\x12\x1B\x0A\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOLLECTION\x10\x01\x12\x14\x0A\x10COLLECTION_GROUP\x10\x02\x12\x18\x0A\x14COLLECTION_RECURSIVE\x10\x03\"K\x0A\x08ApiScope\x12\x0B\x0A\x07ANY_API\x10\x00\x12\x16\x0A\x12DATASTORE_MODE_API\x10\x01\x12\x1A\x0A\x16MONGODB_COMPATIBLE_API\x10\x02\"I\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03\"M\x0A\x07Density\x12\x17\x0A\x13DENSITY_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ASPARSE_ALL\x10\x01\x12\x0E\x0A\x0ASPARSE_ANY\x10\x02\x12\x09\x0A\x05DENSE\x10\x03:z\xEAAw\x0A\x1Efirestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php new file mode 100644 index 000000000000..95b567f8eaae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC0\x02\x0A(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\x0A\x10LocationMetadataB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php new file mode 100644 index 000000000000..9c8527e9e62e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xAD\x1F\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xCF\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xE8\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\x124\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php new file mode 100644 index 000000000000..554a536be61d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC1\x03\x0A0google/firestore/admin/v1/realtime_updates.proto\x12\x19google.firestore.admin.v1*\x83\x01\x0A\x13RealtimeUpdatesMode\x12%\x0A!REALTIME_UPDATES_MODE_UNSPECIFIED\x10\x00\x12!\x0A\x1DREALTIME_UPDATES_MODE_ENABLED\x10\x01\x12\"\x0A\x1EREALTIME_UPDATES_MODE_DISABLED\x10\x02B\xE3\x01\x0A\x1Dcom.google.firestore.admin.v1B\x14RealtimeUpdatesProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php new file mode 100644 index 000000000000..045809417af4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xCA\x07\x0A(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\"\xD6\x03\x0A\x0EBackupSchedule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12,\x0A\x09retention\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12F\x0A\x10daily_recurrence\x18\x07 \x01(\x0B2*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\x0A\x11weekly_recurrence\x18\x08 \x01(\x0B2+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xEAAt\x0A'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0C\x0A\x0Arecurrence\"\x11\x0A\x0FDailyRecurrence\"7\x0A\x10WeeklyRecurrence\x12#\x0A\x03day\x18\x02 \x01(\x0E2\x16.google.type.DayOfWeekB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php new file mode 100644 index 000000000000..ae50af2b85eb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\x8D\x04\x0A(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x9E\x01\x0A\x0CPitrSnapshot\x12;\x0A\x08database\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x02 \x01(\x0CB\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02B\xE0\x01\x0A\x1Dcom.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php new file mode 100644 index 000000000000..801548a219df --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA5\x07\x0A*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB7\x04\x0A\x09UserCreds\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.firestore.admin.v1.UserCreds.StateB\x03\xE0A\x03\x12\x1C\x0A\x0Fsecure_password\x18\x05 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x11resource_identity\x18\x06 \x01(\x0B25.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1A*\x0A\x10ResourceIdentity\x12\x16\x0A\x09principal\x18\x01 \x01(\x09B\x03\xE0A\x03\"9\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02:}\xEAAz\x0A\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\x09userCreds2\x09userCredsB\x13\x0A\x11UserCredsIdentityB\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php new file mode 100644 index 000000000000..1f840d0bcfc9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php @@ -0,0 +1,327 @@ +google.firestore.admin.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_uid = ''; + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $snapshot_time = null; + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stats = null; + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * @type string $database + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * @type string $database_uid + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * @type \Google\Protobuf\Timestamp $snapshot_time + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The timestamp at which this backup expires. + * @type \Google\Cloud\Firestore\Admin\V1\Backup\Stats $stats + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * @type int $state + * Output only. The current state of the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseUid() + { + return $this->database_uid; + } + + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseUid($var) + { + GPBUtil::checkString($var, True); + $this->database_uid = $var; + + return $this; + } + + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Firestore\Admin\V1\Backup\Stats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Firestore\Admin\V1\Backup\Stats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Backup\Stats::class); + $this->stats = $var; + + return $this; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php new file mode 100644 index 000000000000..a88be83f7339 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php @@ -0,0 +1,69 @@ +google.firestore.admin.v1.Backup.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The pending backup is still being created. Operations on the + * backup will be rejected in this state. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The backup is complete and ready to use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The backup is not available at this moment. + * + * Generated from protobuf enum NOT_AVAILABLE = 3; + */ + const NOT_AVAILABLE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::NOT_AVAILABLE => 'NOT_AVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php new file mode 100644 index 000000000000..830da955b0cd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php @@ -0,0 +1,139 @@ +google.firestore.admin.v1.Backup.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $document_count = 0; + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $size_bytes + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * @type int|string $document_count + * Output only. The total number of documents contained in the backup. + * @type int|string $index_count + * Output only. The total number of index entries contained in the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDocumentCount() + { + return $this->document_count; + } + + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDocumentCount($var) + { + GPBUtil::checkInt64($var); + $this->document_count = $var; + + return $this; + } + + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getIndexCount() + { + return $this->index_count; + } + + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setIndexCount($var) + { + GPBUtil::checkInt64($var); + $this->index_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php new file mode 100644 index 000000000000..2f86c6cbe31b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php @@ -0,0 +1,316 @@ +google.firestore.admin.v1.BackupSchedule + */ +class BackupSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + */ + protected $retention = null; + protected $recurrence; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * @type \Google\Protobuf\Duration $retention + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence + * For a schedule that runs daily. + * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence + * For a schedule that runs weekly on a specific day. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * 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. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * 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; + } + + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getRetention() + { + return $this->retention; + } + + public function hasRetention() + { + return isset($this->retention); + } + + public function clearRetention() + { + unset($this->retention); + } + + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetention($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention = $var; + + return $this; + } + + /** + * For a schedule that runs daily. + * + * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; + * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null + */ + public function getDailyRecurrence() + { + return $this->readOneof(7); + } + + public function hasDailyRecurrence() + { + return $this->hasOneof(7); + } + + /** + * For a schedule that runs daily. + * + * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; + * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var + * @return $this + */ + public function setDailyRecurrence($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\DailyRecurrence::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * For a schedule that runs weekly on a specific day. + * + * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; + * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null + */ + public function getWeeklyRecurrence() + { + return $this->readOneof(8); + } + + public function hasWeeklyRecurrence() + { + return $this->hasOneof(8); + } + + /** + * For a schedule that runs weekly on a specific day. + * + * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; + * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var + * @return $this + */ + public function setWeeklyRecurrence($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getRecurrence() + { + return $this->whichOneof("recurrence"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php new file mode 100644 index 000000000000..37beadb05832 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php @@ -0,0 +1,373 @@ +google.firestore.admin.v1.BulkDeleteDocumentsMetadata + */ +class BulkDeleteDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * The IDs of the collection groups that are being deleted. + * @type string[] $namespace_ids + * Which namespace IDs are being deleted. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php new file mode 100644 index 000000000000..b112a4710b9e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php @@ -0,0 +1,193 @@ +google.firestore.admin.v1.BulkDeleteDocumentsRequest + */ +class BulkDeleteDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $collection_ids; + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $namespace_ids; + + /** + * @param string $name Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsRequest + * + * @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. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * @type string[] $namespace_ids + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_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. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_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; + } + + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php new file mode 100644 index 000000000000..7a6fa0418629 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.BulkDeleteDocumentsResponse + */ +class BulkDeleteDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php new file mode 100644 index 000000000000..156b3e92f64f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php @@ -0,0 +1,278 @@ +google.firestore.admin.v1.CloneDatabaseMetadata + */ +class CloneDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + protected $pitr_snapshot = null; + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + protected $progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time the clone was started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the clone finished, unset for ongoing clones. + * @type int $operation_state + * The operation state of the clone. + * @type string $database + * The name of the database being cloned to. + * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot + * The snapshot from which this database was cloned. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage + * How far along the clone is as an estimated percentage of remaining time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null + */ + public function getPitrSnapshot() + { + return $this->pitr_snapshot; + } + + public function hasPitrSnapshot() + { + return isset($this->pitr_snapshot); + } + + public function clearPitrSnapshot() + { + unset($this->pitr_snapshot); + } + + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var + * @return $this + */ + public function setPitrSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); + $this->pitr_snapshot = $var; + + return $this; + } + + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + public function hasProgressPercentage() + { + return isset($this->progress_percentage); + } + + public function clearProgressPercentage() + { + unset($this->progress_percentage); + } + + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php new file mode 100644 index 000000000000..16f607528833 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php @@ -0,0 +1,284 @@ +google.firestore.admin.v1.CloneDatabaseRequest + */ +class CloneDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pitr_snapshot = null; + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to clone the database in. Format is + * `projects/{project_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 project to clone the database in. Format is + * `projects/{project_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 ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null + */ + public function getPitrSnapshot() + { + return $this->pitr_snapshot; + } + + public function hasPitrSnapshot() + { + return isset($this->pitr_snapshot); + } + + public function clearPitrSnapshot() + { + unset($this->pitr_snapshot); + } + + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var + * @return $this + */ + public function setPitrSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); + $this->pitr_snapshot = $var; + + return $this; + } + + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php new file mode 100644 index 000000000000..5b111b40539a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php @@ -0,0 +1,134 @@ +google.firestore.admin.v1.CreateBackupScheduleRequest + */ +class CreateBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_schedule = null; + + /** + * @param string $parent Required. The parent database. + * + * Format `projects/{project}/databases/{database}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to create. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateBackupScheduleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule): self + { + return (new self()) + ->setParent($parent) + ->setBackupSchedule($backupSchedule); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule + * Required. The backup schedule to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * + * 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 database. + * Format `projects/{project}/databases/{database}` + * + * 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 backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null + */ + public function getBackupSchedule() + { + return $this->backup_schedule; + } + + public function hasBackupSchedule() + { + return isset($this->backup_schedule); + } + + public function clearBackupSchedule() + { + unset($this->backup_schedule); + } + + /** + * Required. The backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var + * @return $this + */ + public function setBackupSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php new file mode 100644 index 000000000000..6d7f95468786 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.CreateDatabaseMetadata + */ +class CreateDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php new file mode 100644 index 000000000000..11c925f81e0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php @@ -0,0 +1,196 @@ +google.firestore.admin.v1.CreateDatabaseRequest + */ +class CreateDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = null; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}` + * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The Database to create. + * @param string $databaseId Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * "(default)" database ID is also valid if the database is Standard edition. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateDatabaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Database $database, string $databaseId): self + { + return (new self()) + ->setParent($parent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}` + * @type \Google\Cloud\Firestore\Admin\V1\Database $database + * Required. The Database to create. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_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. A parent name of the form + * `projects/{project_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 Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Required. The Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php new file mode 100644 index 000000000000..cec053239e3a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php @@ -0,0 +1,133 @@ +google.firestore.admin.v1.CreateIndexRequest + */ +class CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\Index $index Required. The composite index to create. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateIndexRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Index $index): self + { + return (new self()) + ->setParent($parent) + ->setIndex($index); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * Required. The composite index to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php new file mode 100644 index 000000000000..9e45f49e81ab --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php @@ -0,0 +1,190 @@ +google.firestore.admin.v1.CreateUserCredsRequest + */ +class CreateUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_creds = null; + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_creds_id = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds Required. The user creds to create. + * @param string $userCredsId Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateUserCredsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds, string $userCredsId): self + { + return (new self()) + ->setParent($parent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds $user_creds + * Required. The user creds to create. + * @type string $user_creds_id + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_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. A parent name of the form + * `projects/{project_id}/databases/{database_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 user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\UserCreds|null + */ + public function getUserCreds() + { + return $this->user_creds; + } + + public function hasUserCreds() + { + return isset($this->user_creds); + } + + public function clearUserCreds() + { + unset($this->user_creds); + } + + /** + * Required. The user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $var + * @return $this + */ + public function setUserCreds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); + $this->user_creds = $var; + + return $this; + } + + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserCredsId() + { + return $this->user_creds_id; + } + + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserCredsId($var) + { + GPBUtil::checkString($var, True); + $this->user_creds_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php new file mode 100644 index 000000000000..4f94e4e67e80 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.DailyRecurrence + */ +class DailyRecurrence extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php new file mode 100644 index 000000000000..7d13814ea225 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php @@ -0,0 +1,1125 @@ +google.firestore.admin.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + */ + protected $location_id = ''; + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + */ + protected $type = 0; + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + */ + protected $concurrency_mode = 0; + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version_retention_period = null; + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $earliest_version_time = null; + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + */ + protected $point_in_time_recovery_enablement = 0; + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + */ + protected $app_engine_integration_mode = 0; + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $key_prefix = ''; + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + */ + protected $delete_protection_state = 0; + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cmek_config = null; + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $previous_id = ''; + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_info = null; + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $free_tier = null; + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + */ + protected $etag = ''; + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $database_edition = 0; + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $realtime_updates_mode = 0; + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $firestore_data_access_mode = 0; + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mongodb_compatible_data_access_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * @type string $uid + * Output only. The system-generated UUID4 for this Database. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * @type string $location_id + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * @type int $type + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * @type int $concurrency_mode + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * @type \Google\Protobuf\Duration $version_retention_period + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * @type \Google\Protobuf\Timestamp $earliest_version_time + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * @type int $point_in_time_recovery_enablement + * Whether to enable the PITR feature on this database. + * @type int $app_engine_integration_mode + * The App Engine integration mode to use for this database. + * @type string $key_prefix + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * @type int $delete_protection_state + * State of delete protection for the database. + * @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config + * Optional. Presence indicates CMEK is enabled for this database. + * @type string $previous_id + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info + * Output only. Information about the provenance of this database. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * @type bool $free_tier + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * @type string $etag + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type int $database_edition + * Immutable. The edition of the database. + * @type int $realtime_updates_mode + * Immutable. The default Realtime Updates mode to use for this database. + * @type int $firestore_data_access_mode + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * @type int $mongodb_compatible_data_access_mode + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @return string + */ + public function getLocationId() + { + return $this->location_id; + } + + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @param string $var + * @return $this + */ + public function setLocationId($var) + { + GPBUtil::checkString($var, True); + $this->location_id = $var; + + return $this; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); + $this->type = $var; + + return $this; + } + + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @return int + */ + public function getConcurrencyMode() + { + return $this->concurrency_mode; + } + + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @param int $var + * @return $this + */ + public function setConcurrencyMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); + $this->concurrency_mode = $var; + + return $this; + } + + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getVersionRetentionPeriod() + { + return $this->version_retention_period; + } + + public function hasVersionRetentionPeriod() + { + return isset($this->version_retention_period); + } + + public function clearVersionRetentionPeriod() + { + unset($this->version_retention_period); + } + + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVersionRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->version_retention_period = $var; + + return $this; + } + + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestVersionTime() + { + return $this->earliest_version_time; + } + + public function hasEarliestVersionTime() + { + return isset($this->earliest_version_time); + } + + public function clearEarliestVersionTime() + { + unset($this->earliest_version_time); + } + + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestVersionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_version_time = $var; + + return $this; + } + + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * @return int + */ + public function getPointInTimeRecoveryEnablement() + { + return $this->point_in_time_recovery_enablement; + } + + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * @param int $var + * @return $this + */ + public function setPointInTimeRecoveryEnablement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class); + $this->point_in_time_recovery_enablement = $var; + + return $this; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @return int + */ + public function getAppEngineIntegrationMode() + { + return $this->app_engine_integration_mode; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @param int $var + * @return $this + */ + public function setAppEngineIntegrationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); + $this->app_engine_integration_mode = $var; + + return $this; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKeyPrefix() + { + return $this->key_prefix; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKeyPrefix($var) + { + GPBUtil::checkString($var, True); + $this->key_prefix = $var; + + return $this; + } + + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * @return int + */ + public function getDeleteProtectionState() + { + return $this->delete_protection_state; + } + + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * @param int $var + * @return $this + */ + public function setDeleteProtectionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class); + $this->delete_protection_state = $var; + + return $this; + } + + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null + */ + public function getCmekConfig() + { + return $this->cmek_config; + } + + public function hasCmekConfig() + { + return isset($this->cmek_config); + } + + public function clearCmekConfig() + { + unset($this->cmek_config); + } + + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var + * @return $this + */ + public function setCmekConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class); + $this->cmek_config = $var; + + return $this; + } + + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPreviousId() + { + return $this->previous_id; + } + + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPreviousId($var) + { + GPBUtil::checkString($var, True); + $this->previous_id = $var; + + return $this; + } + + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null + */ + public function getSourceInfo() + { + return $this->source_info; + } + + public function hasSourceInfo() + { + return isset($this->source_info); + } + + public function clearSourceInfo() + { + unset($this->source_info); + } + + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var + * @return $this + */ + public function setSourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class); + $this->source_info = $var; + + return $this; + } + + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFreeTier() + { + return isset($this->free_tier) ? $this->free_tier : false; + } + + public function hasFreeTier() + { + return isset($this->free_tier); + } + + public function clearFreeTier() + { + unset($this->free_tier); + } + + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFreeTier($var) + { + GPBUtil::checkBool($var); + $this->free_tier = $var; + + return $this; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDatabaseEdition() + { + return $this->database_edition; + } + + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDatabaseEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseEdition::class); + $this->database_edition = $var; + + return $this; + } + + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getRealtimeUpdatesMode() + { + return $this->realtime_updates_mode; + } + + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setRealtimeUpdatesMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\RealtimeUpdatesMode::class); + $this->realtime_updates_mode = $var; + + return $this; + } + + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFirestoreDataAccessMode() + { + return $this->firestore_data_access_mode; + } + + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFirestoreDataAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); + $this->firestore_data_access_mode = $var; + + return $this; + } + + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMongodbCompatibleDataAccessMode() + { + return $this->mongodb_compatible_data_access_mode; + } + + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMongodbCompatibleDataAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); + $this->mongodb_compatible_data_access_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php new file mode 100644 index 000000000000..f81ca80beab3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php @@ -0,0 +1,66 @@ +google.firestore.admin.v1.Database.AppEngineIntegrationMode + */ +class AppEngineIntegrationMode +{ + /** + * Not used. + * + * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + */ + const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + /** + * If an App Engine application exists in the same region as this database, + * App Engine configuration will impact this database. This includes + * disabling of the application & database, as well as disabling writes to + * the database. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * App Engine has no effect on the ability of this database to serve + * requests. + * This is the default setting for databases created with the Firestore API. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php new file mode 100644 index 000000000000..2178af095d91 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php @@ -0,0 +1,151 @@ +google.firestore.admin.v1.Database.CmekConfig + */ +class CmekConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_name = ''; + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $active_key_version; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * @type string[] $active_key_version + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getActiveKeyVersion() + { + return $this->active_key_version; + } + + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setActiveKeyVersion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->active_key_version = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php new file mode 100644 index 000000000000..f34e9bce6751 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php @@ -0,0 +1,78 @@ +google.firestore.admin.v1.Database.ConcurrencyMode + */ +class ConcurrencyMode +{ + /** + * Not used. + * + * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; + */ + const CONCURRENCY_MODE_UNSPECIFIED = 0; + /** + * Use optimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * This is the default setting for Cloud Firestore Enterprise Edition + * databases. + * + * Generated from protobuf enum OPTIMISTIC = 1; + */ + const OPTIMISTIC = 1; + /** + * Use pessimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * This is the default setting for Cloud Firestore Standard Edition + * databases. + * + * Generated from protobuf enum PESSIMISTIC = 2; + */ + const PESSIMISTIC = 2; + /** + * Use optimistic concurrency control with entity groups by default. + * This mode is enabled for some databases that were automatically upgraded + * from Cloud Datastore to Cloud Firestore with Datastore Mode. + * It is not recommended for any new databases, and not supported for + * Firestore Native databases. + * + * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + */ + const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + + private static $valueToName = [ + self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', + self::OPTIMISTIC => 'OPTIMISTIC', + self::PESSIMISTIC => 'PESSIMISTIC', + self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php new file mode 100644 index 000000000000..1768bbfdf76f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Database.DataAccessMode + */ +class DataAccessMode +{ + /** + * Not Used. + * + * Generated from protobuf enum DATA_ACCESS_MODE_UNSPECIFIED = 0; + */ + const DATA_ACCESS_MODE_UNSPECIFIED = 0; + /** + * Accessing the database through the API is allowed. + * + * Generated from protobuf enum DATA_ACCESS_MODE_ENABLED = 1; + */ + const DATA_ACCESS_MODE_ENABLED = 1; + /** + * Accessing the database through the API is disallowed. + * + * Generated from protobuf enum DATA_ACCESS_MODE_DISABLED = 2; + */ + const DATA_ACCESS_MODE_DISABLED = 2; + + private static $valueToName = [ + self::DATA_ACCESS_MODE_UNSPECIFIED => 'DATA_ACCESS_MODE_UNSPECIFIED', + self::DATA_ACCESS_MODE_ENABLED => 'DATA_ACCESS_MODE_ENABLED', + self::DATA_ACCESS_MODE_DISABLED => 'DATA_ACCESS_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php new file mode 100644 index 000000000000..9102fcdc721b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php @@ -0,0 +1,62 @@ +google.firestore.admin.v1.Database.DatabaseEdition + */ +class DatabaseEdition +{ + /** + * Not used. + * + * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; + */ + const DATABASE_EDITION_UNSPECIFIED = 0; + /** + * Standard edition. + * This is the default setting if not specified. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + + private static $valueToName = [ + self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::ENTERPRISE => 'ENTERPRISE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php new file mode 100644 index 000000000000..930fddf71f6f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php @@ -0,0 +1,64 @@ +google.firestore.admin.v1.Database.DatabaseType + */ +class DatabaseType +{ + /** + * Not used. + * + * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; + */ + const DATABASE_TYPE_UNSPECIFIED = 0; + /** + * Firestore Native Mode + * + * Generated from protobuf enum FIRESTORE_NATIVE = 1; + */ + const FIRESTORE_NATIVE = 1; + /** + * Firestore in Datastore Mode. + * + * Generated from protobuf enum DATASTORE_MODE = 2; + */ + const DATASTORE_MODE = 2; + + private static $valueToName = [ + self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', + self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', + self::DATASTORE_MODE => 'DATASTORE_MODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php new file mode 100644 index 000000000000..299230749a07 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Database.DeleteProtectionState + */ +class DeleteProtectionState +{ + /** + * The default value. Delete protection type is not specified + * + * Generated from protobuf enum DELETE_PROTECTION_STATE_UNSPECIFIED = 0; + */ + const DELETE_PROTECTION_STATE_UNSPECIFIED = 0; + /** + * Delete protection is disabled + * + * Generated from protobuf enum DELETE_PROTECTION_DISABLED = 1; + */ + const DELETE_PROTECTION_DISABLED = 1; + /** + * Delete protection is enabled + * + * Generated from protobuf enum DELETE_PROTECTION_ENABLED = 2; + */ + const DELETE_PROTECTION_ENABLED = 2; + + private static $valueToName = [ + self::DELETE_PROTECTION_STATE_UNSPECIFIED => 'DELETE_PROTECTION_STATE_UNSPECIFIED', + self::DELETE_PROTECTION_DISABLED => 'DELETE_PROTECTION_DISABLED', + self::DELETE_PROTECTION_ENABLED => 'DELETE_PROTECTION_ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php new file mode 100644 index 000000000000..510f8a24fa1d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php @@ -0,0 +1,144 @@ +google.firestore.admin.v1.Database.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + protected $encryption_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $google_default_encryption + * Use Google default encryption. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $use_source_encryption + * The database will use the same encryption configuration as the source. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $customer_managed_encryption + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Use Google default encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions|null + */ + public function getGoogleDefaultEncryption() + { + return $this->readOneof(1); + } + + public function hasGoogleDefaultEncryption() + { + return $this->hasOneof(1); + } + + /** + * Use Google default encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $var + * @return $this + */ + public function setGoogleDefaultEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The database will use the same encryption configuration as the source. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions|null + */ + public function getUseSourceEncryption() + { + return $this->readOneof(2); + } + + public function hasUseSourceEncryption() + { + return $this->hasOneof(2); + } + + /** + * The database will use the same encryption configuration as the source. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $var + * @return $this + */ + public function setUseSourceEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions|null + */ + public function getCustomerManagedEncryption() + { + return $this->readOneof(3); + } + + public function hasCustomerManagedEncryption() + { + return $this->hasOneof(3); + } + + /** + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncryptionType() + { + return $this->whichOneof("encryption_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php new file mode 100644 index 000000000000..17074d4754ef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php @@ -0,0 +1,96 @@ +google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + */ +class CustomerManagedEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php new file mode 100644 index 000000000000..3c68de993d27 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + */ +class GoogleDefaultEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php new file mode 100644 index 000000000000..245e680690bc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + */ +class SourceEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php new file mode 100644 index 000000000000..fff9f69765f7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php @@ -0,0 +1,67 @@ +google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + */ +class PointInTimeRecoveryEnablement +{ + /** + * Not used. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; + */ + const POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; + /** + * Reads are supported on selected versions of the data from within the past + * 7 days: + * * Reads against any timestamp within the past hour + * * Reads against 1-minute snapshots beyond 1 hour and within 7 days + * `version_retention_period` and `earliest_version_time` can be + * used to determine the supported versions. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLED = 1; + */ + const POINT_IN_TIME_RECOVERY_ENABLED = 1; + /** + * Reads are supported on any version of the data from within the past 1 + * hour. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_DISABLED = 2; + */ + const POINT_IN_TIME_RECOVERY_DISABLED = 2; + + private static $valueToName = [ + self::POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED => 'POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED', + self::POINT_IN_TIME_RECOVERY_ENABLED => 'POINT_IN_TIME_RECOVERY_ENABLED', + self::POINT_IN_TIME_RECOVERY_DISABLED => 'POINT_IN_TIME_RECOVERY_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php new file mode 100644 index 000000000000..4677a5d1b31b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php @@ -0,0 +1,120 @@ +google.firestore.admin.v1.Database.SourceInfo + */ +class SourceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + */ + protected $operation = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $backup + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * @type string $operation + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource|null + */ + public function getBackup() + { + return $this->readOneof(1); + } + + public function hasBackup() + { + return $this->hasOneof(1); + } + + /** + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php new file mode 100644 index 000000000000..43ccc3a5167b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php @@ -0,0 +1,75 @@ +google.firestore.admin.v1.Database.SourceInfo.BackupSource + */ +class BackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + */ + protected $backup = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $backup + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..2495637aee5b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup to delete. + * + * format is `projects/{project}/locations/{location}/backups/{backup}`. Please see + * {@see FirestoreAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupRequest + * + * @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. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * 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. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php new file mode 100644 index 000000000000..db965ce73d76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php @@ -0,0 +1,92 @@ +google.firestore.admin.v1.DeleteBackupScheduleRequest + */ +class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the backup schedule. + * + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php new file mode 100644 index 000000000000..a1573dc43b4c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.DeleteDatabaseMetadata + */ +class DeleteDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php new file mode 100644 index 000000000000..cc25c2af8af8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php @@ -0,0 +1,129 @@ +google.firestore.admin.v1.DeleteDatabaseRequest + */ +class DeleteDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteDatabaseRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}` + * @type string $etag + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_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. A name of the form + * `projects/{project_id}/databases/{database_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; + } + + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php new file mode 100644 index 000000000000..af55872cb361 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DeleteIndexRequest + */ +class DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php new file mode 100644 index 000000000000..5b8386eac930 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DeleteUserCredsRequest + */ +class DeleteUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteUserCredsRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php new file mode 100644 index 000000000000..df8d6e29323a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DisableUserCredsRequest + */ +class DisableUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DisableUserCredsRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php new file mode 100644 index 000000000000..15bfff96c98b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.EnableUserCredsRequest + */ +class EnableUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\EnableUserCredsRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php new file mode 100644 index 000000000000..9af4ec049423 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php @@ -0,0 +1,403 @@ +google.firestore.admin.v1.ExportDocumentsMetadata + */ +class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + */ + protected $output_uri_prefix = ''; + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the export operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * Which collection IDs are being exported. + * @type string $output_uri_prefix + * Where the documents are being exported to. + * @type string[] $namespace_ids + * Which namespace IDs are being exported. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php new file mode 100644 index 000000000000..eb91d63fb295 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php @@ -0,0 +1,305 @@ +google.firestore.admin.v1.ExportDocumentsRequest + */ +class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + */ + protected $output_uri_prefix = ''; + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + */ + protected $snapshot_time = null; + + /** + * @param string $name Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest + * + * @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. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * @type string $output_uri_prefix + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * @type string[] $namespace_ids + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_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. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_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; + } + + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php new file mode 100644 index 000000000000..63aac67f8b8a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php @@ -0,0 +1,76 @@ +google.firestore.admin.v1.ExportDocumentsResponse + */ +class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_uri_prefix + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php new file mode 100644 index 000000000000..28645d2447cf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php @@ -0,0 +1,253 @@ +google.firestore.admin.v1.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + protected $index_config = null; + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + */ + protected $ttl_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null + */ + public function getIndexConfig() + { + return $this->index_config; + } + + public function hasIndexConfig() + { + return isset($this->index_config); + } + + public function clearIndexConfig() + { + unset($this->index_config); + } + + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var + * @return $this + */ + public function setIndexConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); + $this->index_config = $var; + + return $this; + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null + */ + public function getTtlConfig() + { + return $this->ttl_config; + } + + public function hasTtlConfig() + { + return isset($this->ttl_config); + } + + public function clearTtlConfig() + { + unset($this->ttl_config); + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var + * @return $this + */ + public function setTtlConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); + $this->ttl_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php new file mode 100644 index 000000000000..7c74b5f4b7b5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php @@ -0,0 +1,205 @@ +google.firestore.admin.v1.Field.IndexConfig + */ +class IndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + */ + protected $uses_ancestor_config = false; + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + */ + protected $ancestor_field = ''; + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + */ + protected $reverting = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes + * The indexes supported for this field. + * @type bool $uses_ancestor_config + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * @type string $ancestor_field + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * @type bool $reverting + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @return bool + */ + public function getUsesAncestorConfig() + { + return $this->uses_ancestor_config; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @param bool $var + * @return $this + */ + public function setUsesAncestorConfig($var) + { + GPBUtil::checkBool($var); + $this->uses_ancestor_config = $var; + + return $this; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @return string + */ + public function getAncestorField() + { + return $this->ancestor_field; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @param string $var + * @return $this + */ + public function setAncestorField($var) + { + GPBUtil::checkString($var, True); + $this->ancestor_field = $var; + + return $this; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @return bool + */ + public function getReverting() + { + return $this->reverting; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @param bool $var + * @return $this + */ + public function setReverting($var) + { + GPBUtil::checkBool($var); + $this->reverting = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php new file mode 100644 index 000000000000..664a2ae55edb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php @@ -0,0 +1,140 @@ +google.firestore.admin.v1.Field.TtlConfig + */ +class TtlConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $expiration_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The state of the TTL configuration. + * @type \Google\Protobuf\Duration $expiration_offset + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php new file mode 100644 index 000000000000..3f5647cd9139 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php @@ -0,0 +1,75 @@ +google.firestore.admin.v1.Field.TtlConfig.State + */ +class State +{ + /** + * The state is unspecified or unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The TTL is being applied. There is an active long-running operation to + * track the change. Newly written documents will have TTLs applied as + * requested. Requested TTLs on existing documents are still being + * processed. When TTLs on all existing documents have been processed, the + * state will move to 'ACTIVE'. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The TTL is active for all documents. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The TTL configuration could not be enabled for all existing documents. + * Newly written documents will continue to have their TTL applied. + * The LRO returned when last attempting to enable TTL for this `Field` + * has failed, and may have more details. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php new file mode 100644 index 000000000000..8df053b4e432 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php @@ -0,0 +1,373 @@ +google.firestore.admin.v1.FieldOperationMetadata + */ +class FieldOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + */ + protected $field = ''; + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + */ + private $index_config_deltas; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + protected $progress_bytes = null; + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + */ + protected $ttl_config_delta = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $field + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $index_config_deltas + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta + * Describes the deltas of TTL configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta> + */ + public function getIndexConfigDeltas() + { + return $this->index_config_deltas; + } + + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $var + * @return $this + */ + public function setIndexConfigDeltas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); + $this->index_config_deltas = $arr; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null + */ + public function getTtlConfigDelta() + { + return $this->ttl_config_delta; + } + + public function hasTtlConfigDelta() + { + return isset($this->ttl_config_delta); + } + + public function clearTtlConfigDelta() + { + unset($this->ttl_config_delta); + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var + * @return $this + */ + public function setTtlConfigDelta($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); + $this->ttl_config_delta = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php new file mode 100644 index 000000000000..212f34a5b90c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php @@ -0,0 +1,111 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + */ +class IndexConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + */ + protected $index = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the index is changing. + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * The index being changed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php new file mode 100644 index 000000000000..cf7058555cad --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The single field index is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The single field index is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php new file mode 100644 index 000000000000..7e4bcbf2e563 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php @@ -0,0 +1,115 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + */ +class TtlConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + */ + protected $expiration_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the TTL configuration is changing. + * @type \Google\Protobuf\Duration $expiration_offset + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php new file mode 100644 index 000000000000..ce9d1598e609 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The TTL config is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The TTL config is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php new file mode 100644 index 000000000000..509497b1c82f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup to fetch. + * + * Format is `projects/{project}/locations/{location}/backups/{backup}`. Please see + * {@see FirestoreAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetBackupRequest + * + * @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. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * 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. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php new file mode 100644 index 000000000000..efb9342983af --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php @@ -0,0 +1,93 @@ +google.firestore.admin.v1.GetBackupScheduleRequest + */ +class GetBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the backup schedule. + * + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetBackupScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php new file mode 100644 index 000000000000..de4fafa9bb43 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetDatabaseRequest + */ +class GetDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_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. A name of the form + * `projects/{project_id}/databases/{database_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php new file mode 100644 index 000000000000..98a81de0b9cc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetFieldRequest + */ +class GetFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * Please see {@see FirestoreAdminClient::fieldName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetFieldRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php new file mode 100644 index 000000000000..832f881b9b21 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetIndexRequest + */ +class GetIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetIndexRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php new file mode 100644 index 000000000000..4c672c6b75f3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetUserCredsRequest + */ +class GetUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetUserCredsRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php new file mode 100644 index 000000000000..e6ce541ffbed --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php @@ -0,0 +1,351 @@ +google.firestore.admin.v1.ImportDocumentsMetadata + */ +class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + */ + protected $input_uri_prefix = ''; + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + */ + private $namespace_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the import operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * Which collection IDs are being imported. + * @type string $input_uri_prefix + * The location of the documents being imported. + * @type string[] $namespace_ids + * Which namespace IDs are being imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php new file mode 100644 index 000000000000..e59bbc42fc7f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php @@ -0,0 +1,229 @@ +google.firestore.admin.v1.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + */ + protected $input_uri_prefix = ''; + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + */ + private $namespace_ids; + + /** + * @param string $name Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest + * + * @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. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * @type string $input_uri_prefix + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * @type string[] $namespace_ids + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_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. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_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; + } + + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php new file mode 100644 index 000000000000..ad324a132809 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php @@ -0,0 +1,432 @@ +google.firestore.admin.v1.Index + */ +class Index extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + protected $query_scope = 0; + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + */ + protected $api_scope = 0; + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + private $fields; + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + */ + protected $state = 0; + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $density = 0; + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multikey = false; + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shard_count = 0; + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unique = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * @type int $query_scope + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * @type int $api_scope + * The API scope supported by this index. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $fields + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * @type int $state + * Output only. The serving state of the index. + * @type int $density + * Immutable. The density configuration of the index. + * @type bool $multikey + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * @type int $shard_count + * Optional. The number of shards for the index. + * @type bool $unique + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @return int + */ + public function getQueryScope() + { + return $this->query_scope; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @param int $var + * @return $this + */ + public function setQueryScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); + $this->query_scope = $var; + + return $this; + } + + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + * @return int + */ + public function getApiScope() + { + return $this->api_scope; + } + + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + * @param int $var + * @return $this + */ + public function setApiScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\ApiScope::class); + $this->api_scope = $var; + + return $this; + } + + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index\IndexField> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); + $this->state = $var; + + return $this; + } + + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDensity() + { + return $this->density; + } + + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDensity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\Density::class); + $this->density = $var; + + return $this; + } + + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMultikey() + { + return $this->multikey; + } + + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMultikey($var) + { + GPBUtil::checkBool($var); + $this->multikey = $var; + + return $this; + } + + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUnique() + { + return $this->unique; + } + + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUnique($var) + { + GPBUtil::checkBool($var); + $this->unique = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php new file mode 100644 index 000000000000..82f955ef90e9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php @@ -0,0 +1,63 @@ +google.firestore.admin.v1.Index.ApiScope + */ +class ApiScope +{ + /** + * The index can only be used by the Firestore Native query API. + * This is the default. + * + * Generated from protobuf enum ANY_API = 0; + */ + const ANY_API = 0; + /** + * The index can only be used by the Firestore in Datastore Mode query API. + * + * Generated from protobuf enum DATASTORE_MODE_API = 1; + */ + const DATASTORE_MODE_API = 1; + /** + * The index can only be used by the MONGODB_COMPATIBLE_API. + * + * Generated from protobuf enum MONGODB_COMPATIBLE_API = 2; + */ + const MONGODB_COMPATIBLE_API = 2; + + private static $valueToName = [ + self::ANY_API => 'ANY_API', + self::DATASTORE_MODE_API => 'DATASTORE_MODE_API', + self::MONGODB_COMPATIBLE_API => 'MONGODB_COMPATIBLE_API', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php new file mode 100644 index 000000000000..1ceec9170909 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php @@ -0,0 +1,109 @@ +google.firestore.admin.v1.Index.Density + */ +class Density +{ + /** + * Unspecified. It will use database default setting. This value is input + * only. + * + * Generated from protobuf enum DENSITY_UNSPECIFIED = 0; + */ + const DENSITY_UNSPECIFIED = 0; + /** + * An index entry will only exist if ALL fields are present in the document. + * This is both the default and only allowed value for Standard Edition + * databases (for both Cloud Firestore `ANY_API` and Cloud Datastore + * `DATASTORE_MODE_API`). + * Take for example the following document: + * ``` + * { + * "__name__": "...", + * "a": 1, + * "b": 2, + * "c": 3 + * } + * ``` + * an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index + * entry for this document since `a`, 'b', `c`, and `__name__` are all + * present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate + * an index entry for this document since `d` is missing. + * This means that such indexes can only be used to serve a query when the + * query has either implicit or explicit requirements that all fields from + * the index are present. + * + * Generated from protobuf enum SPARSE_ALL = 1; + */ + const SPARSE_ALL = 1; + /** + * An index entry will exist if ANY field are present in the document. + * This is used as the definition of a sparse index for Enterprise Edition + * databases. + * Take for example the following document: + * ``` + * { + * "__name__": "...", + * "a": 1, + * "b": 2, + * "c": 3 + * } + * ``` + * an index on `(a ASC, d ASC)` will generate an index entry for this + * document since `a` is present, and will fill in an `unset` value for `d`. + * An index on `(d ASC, e ASC)` will not generate any index entry as neither + * `d` nor `e` are present. + * An index that contains `__name__` will generate an index entry for all + * documents since Firestore guarantees that all documents have a `__name__` + * field. + * + * Generated from protobuf enum SPARSE_ANY = 2; + */ + const SPARSE_ANY = 2; + /** + * An index entry will exist regardless of if the fields are present or not. + * This is the default density for an Enterprise Edition database. + * The index will store `unset` values for fields that are not present in + * the document. + * + * Generated from protobuf enum DENSE = 3; + */ + const DENSE = 3; + + private static $valueToName = [ + self::DENSITY_UNSPECIFIED => 'DENSITY_UNSPECIFIED', + self::SPARSE_ALL => 'SPARSE_ALL', + self::SPARSE_ANY => 'SPARSE_ANY', + self::DENSE => 'DENSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php new file mode 100644 index 000000000000..9eb85626fcba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php @@ -0,0 +1,191 @@ +google.firestore.admin.v1.Index.IndexField + */ +class IndexField extends \Google\Protobuf\Internal\Message +{ + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $value_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * @type int $order + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * @type int $array_config + * Indicates that this field supports operations on `array_value`s. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $vector_config + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @return int + */ + public function getOrder() + { + return $this->readOneof(2); + } + + public function hasOrder() + { + return $this->hasOneof(2); + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @return int + */ + public function getArrayConfig() + { + return $this->readOneof(3); + } + + public function hasArrayConfig() + { + return $this->hasOneof(3); + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @param int $var + * @return $this + */ + public function setArrayConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig|null + */ + public function getVectorConfig() + { + return $this->readOneof(4); + } + + public function hasVectorConfig() + { + return $this->hasOneof(4); + } + + /** + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $var + * @return $this + */ + public function setVectorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueMode() + { + return $this->whichOneof("value_mode"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php new file mode 100644 index 000000000000..e44e7c449bba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php @@ -0,0 +1,54 @@ +google.firestore.admin.v1.Index.IndexField.ArrayConfig + */ +class ArrayConfig +{ + /** + * The index does not support additional array queries. + * + * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; + */ + const ARRAY_CONFIG_UNSPECIFIED = 0; + /** + * The index supports array containment queries. + * + * Generated from protobuf enum CONTAINS = 1; + */ + const CONTAINS = 1; + + private static $valueToName = [ + self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', + self::CONTAINS => 'CONTAINS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php new file mode 100644 index 000000000000..6c7b3ab13bc3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Index.IndexField.Order + */ +class Order +{ + /** + * The ordering is unspecified. Not a valid option. + * + * Generated from protobuf enum ORDER_UNSPECIFIED = 0; + */ + const ORDER_UNSPECIFIED = 0; + /** + * The field is ordered by ascending field value. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * The field is ordered by descending field value. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php new file mode 100644 index 000000000000..f1cbd5ee0352 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php @@ -0,0 +1,117 @@ +google.firestore.admin.v1.Index.IndexField.VectorConfig + */ +class VectorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dimension = 0; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $flat + * Indicates the vector index is a flat index. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkInt32($var); + $this->dimension = $var; + + return $this; + } + + /** + * Indicates the vector index is a flat index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null + */ + public function getFlat() + { + return $this->readOneof(2); + } + + public function hasFlat() + { + return $this->hasOneof(2); + } + + /** + * Indicates the vector index is a flat index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $var + * @return $this + */ + public function setFlat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php new file mode 100644 index 000000000000..6247e505d63a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex + */ +class FlatIndex extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php new file mode 100644 index 000000000000..a2bee11d68a8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php @@ -0,0 +1,74 @@ +google.firestore.admin.v1.Index.QueryScope + */ +class QueryScope +{ + /** + * The query scope is unspecified. Not a valid option. + * + * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; + */ + const QUERY_SCOPE_UNSPECIFIED = 0; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified + * at query time, and that has the collection ID specified by the index. + * + * Generated from protobuf enum COLLECTION = 1; + */ + const COLLECTION = 1; + /** + * Indexes with a collection group query scope specified allow queries + * against all collections that has the collection ID specified by the + * index. + * + * Generated from protobuf enum COLLECTION_GROUP = 2; + */ + const COLLECTION_GROUP = 2; + /** + * Include all the collections's ancestor in the index. Only available for + * Datastore Mode databases. + * + * Generated from protobuf enum COLLECTION_RECURSIVE = 3; + */ + const COLLECTION_RECURSIVE = 3; + + private static $valueToName = [ + self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', + self::COLLECTION => 'COLLECTION', + self::COLLECTION_GROUP => 'COLLECTION_GROUP', + self::COLLECTION_RECURSIVE => 'COLLECTION_RECURSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php new file mode 100644 index 000000000000..bf31eec158a0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php @@ -0,0 +1,83 @@ +google.firestore.admin.v1.Index.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The index is being created. + * There is an active long-running operation for the index. + * The index is updated when writing a document. + * Some index data may exist. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The index is ready to be used. + * The index is updated when writing a document. + * The index is fully populated from all stored documents it applies to. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The index was being created, but something went wrong. + * There is no active long-running operation for the index, + * and the most recently finished long-running operation failed. + * The index is not updated when writing a document. + * Some index data may exist. + * Use the google.longrunning.Operations API to determine why the operation + * that last attempted to create this index failed, then re-create the + * index. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php new file mode 100644 index 000000000000..e9cec99074ea --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php @@ -0,0 +1,287 @@ +google.firestore.admin.v1.IndexOperationMetadata + */ +class IndexOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + */ + protected $index = ''; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + protected $progress_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $index + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php new file mode 100644 index 000000000000..d05171b63611 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.ListBackupSchedulesRequest + */ +class ListBackupSchedulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. The parent database. + * + * Format is `projects/{project}/databases/{database}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesRequest + * + * @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 database. + * Format is `projects/{project}/databases/{database}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * + * 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 database. + * Format is `projects/{project}/databases/{database}`. + * + * 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; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php new file mode 100644 index 000000000000..230e34ceb900 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php @@ -0,0 +1,68 @@ +google.firestore.admin.v1.ListBackupSchedulesResponse + */ +class ListBackupSchedulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + */ + private $backup_schedules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $backup_schedules + * List of all backup schedules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\BackupSchedule> + */ + public function getBackupSchedules() + { + return $this->backup_schedules; + } + + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $var + * @return $this + */ + public function setBackupSchedules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..6c6222670971 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php @@ -0,0 +1,169 @@ +google.firestore.admin.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The location to list backups from. + * + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. Please see + * {@see FirestoreAdminClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * @type string $filter + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..8b2b6447cb77 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php @@ -0,0 +1,118 @@ +google.firestore.admin.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + */ + private $backups; + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Backup[] $backups + * List of all backups for the project. + * @type string[] $unreachable + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Backup> + */ + public function getBackups() + { + return $this->backups; + } + + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Backup[] $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php new file mode 100644 index 000000000000..8476d8052464 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php @@ -0,0 +1,120 @@ +google.firestore.admin.v1.ListDatabasesRequest + */ +class ListDatabasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}` + * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest + * + * @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. A parent name of the form + * `projects/{project_id}` + * @type bool $show_deleted + * If true, also returns deleted resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_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. A parent name of the form + * `projects/{project_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; + } + + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php new file mode 100644 index 000000000000..f3a9c42afa12 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php @@ -0,0 +1,129 @@ +google.firestore.admin.v1.ListDatabasesResponse + */ +class ListDatabasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + */ + private $databases; + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database[] $databases + * The databases in the project. + * @type string[] $unreachable + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Database> + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database[] $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->databases = $arr; + + return $this; + } + + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php new file mode 100644 index 000000000000..8596394a0bb5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php @@ -0,0 +1,221 @@ +google.firestore.admin.v1.ListFieldsRequest + */ +class ListFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest + * + * @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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The number of results to return. + * + * 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; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php new file mode 100644 index 000000000000..7273ec784839 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php @@ -0,0 +1,106 @@ +google.firestore.admin.v1.ListFieldsResponse + */ +class ListFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + */ + private $fields; + /** + * A page token that may be used to request another page of results. If blank, + * this is 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 \Google\Cloud\Firestore\Admin\V1\Field[] $fields + * The requested fields. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Field> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Field[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->fields = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php new file mode 100644 index 000000000000..cb2ca52982de --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php @@ -0,0 +1,197 @@ +google.firestore.admin.v1.ListIndexesRequest + */ +class ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest + * + * @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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The number of results to return. + * + * 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; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php new file mode 100644 index 000000000000..2306044b0674 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php @@ -0,0 +1,106 @@ +google.firestore.admin.v1.ListIndexesResponse + */ +class ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * A page token that may be used to request another page of results. If blank, + * this is 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 \Google\Cloud\Firestore\Admin\V1\Index[] $indexes + * The requested indexes. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php new file mode 100644 index 000000000000..c8d03d1b1d3b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.ListUserCredsRequest + */ +class ListUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListUserCredsRequest + * + * @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. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_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. A parent database name of the form + * `projects/{project_id}/databases/{database_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; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php new file mode 100644 index 000000000000..af839e0ebc78 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php @@ -0,0 +1,68 @@ +google.firestore.admin.v1.ListUserCredsResponse + */ +class ListUserCredsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + private $user_creds; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds[] $user_creds + * The user creds for the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\UserCreds> + */ + public function getUserCreds() + { + return $this->user_creds; + } + + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds[] $var + * @return $this + */ + public function setUserCreds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); + $this->user_creds = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php new file mode 100644 index 000000000000..995a7845b650 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php new file mode 100644 index 000000000000..73244df17d28 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php @@ -0,0 +1,98 @@ +google.firestore.admin.v1.OperationState + */ +class OperationState +{ + /** + * Unspecified. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Request is being prepared for processing. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * Request is actively being processed. + * + * Generated from protobuf enum PROCESSING = 2; + */ + const PROCESSING = 2; + /** + * Request is in the process of being cancelled after user called + * google.longrunning.Operations.CancelOperation on the operation. + * + * Generated from protobuf enum CANCELLING = 3; + */ + const CANCELLING = 3; + /** + * Request has been processed and is in its finalization stage. + * + * Generated from protobuf enum FINALIZING = 4; + */ + const FINALIZING = 4; + /** + * Request has completed successfully. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * Request has finished being processed, but encountered an error. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Request has finished being cancelled after user called + * google.longrunning.Operations.CancelOperation. + * + * Generated from protobuf enum CANCELLED = 7; + */ + const CANCELLED = 7; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::PROCESSING => 'PROCESSING', + self::CANCELLING => 'CANCELLING', + self::FINALIZING => 'FINALIZING', + self::SUCCESSFUL => 'SUCCESSFUL', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php new file mode 100644 index 000000000000..1d3ed47beeef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php @@ -0,0 +1,153 @@ +google.firestore.admin.v1.PitrSnapshot + */ +class PitrSnapshot extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_uid = ''; + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * @type string $database_uid + * Output only. Public UUID of the database the snapshot was associated with. + * @type \Google\Protobuf\Timestamp $snapshot_time + * Required. Snapshot time of the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseUid() + { + return $this->database_uid; + } + + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseUid($var) + { + GPBUtil::checkString($var, False); + $this->database_uid = $var; + + return $this; + } + + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php new file mode 100644 index 000000000000..f7c35b1de363 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php @@ -0,0 +1,103 @@ +google.firestore.admin.v1.Progress + */ +class Progress extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + */ + protected $estimated_work = 0; + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + */ + protected $completed_work = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $estimated_work + * The amount of work estimated. + * @type int|string $completed_work + * The amount of work completed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @return int|string + */ + public function getEstimatedWork() + { + return $this->estimated_work; + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @param int|string $var + * @return $this + */ + public function setEstimatedWork($var) + { + GPBUtil::checkInt64($var); + $this->estimated_work = $var; + + return $this; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @return int|string + */ + public function getCompletedWork() + { + return $this->completed_work; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @param int|string $var + * @return $this + */ + public function setCompletedWork($var) + { + GPBUtil::checkInt64($var); + $this->completed_work = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php new file mode 100644 index 000000000000..a9a985996dba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php @@ -0,0 +1,62 @@ +google.firestore.admin.v1.RealtimeUpdatesMode + */ +class RealtimeUpdatesMode +{ + /** + * The Realtime Updates feature is not specified. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_UNSPECIFIED = 0; + */ + const REALTIME_UPDATES_MODE_UNSPECIFIED = 0; + /** + * The Realtime Updates feature is enabled by default. + * This could potentially degrade write performance for the database. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_ENABLED = 1; + */ + const REALTIME_UPDATES_MODE_ENABLED = 1; + /** + * The Realtime Updates feature is disabled by default. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_DISABLED = 2; + */ + const REALTIME_UPDATES_MODE_DISABLED = 2; + + private static $valueToName = [ + self::REALTIME_UPDATES_MODE_UNSPECIFIED => 'REALTIME_UPDATES_MODE_UNSPECIFIED', + self::REALTIME_UPDATES_MODE_ENABLED => 'REALTIME_UPDATES_MODE_ENABLED', + self::REALTIME_UPDATES_MODE_DISABLED => 'REALTIME_UPDATES_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php new file mode 100644 index 000000000000..191470b20c2f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.ResetUserPasswordRequest + */ +class ResetUserPasswordRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ResetUserPasswordRequest + * + * @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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php new file mode 100644 index 000000000000..836cf1956dca --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php @@ -0,0 +1,268 @@ +google.firestore.admin.v1.RestoreDatabaseMetadata + */ +class RestoreDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + */ + protected $backup = ''; + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + */ + protected $progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time the restore was started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the restore finished, unset for ongoing restores. + * @type int $operation_state + * The operation state of the restore. + * @type string $database + * The name of the database being restored to. + * @type string $backup + * The name of the backup restoring from. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage + * How far along the restore is as an estimated percentage of remaining time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @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); + } + + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @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); + } + + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + public function hasProgressPercentage() + { + return isset($this->progress_percentage); + } + + public function clearProgressPercentage() + { + unset($this->progress_percentage); + } + + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php new file mode 100644 index 000000000000..7c2236e7bd2d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php @@ -0,0 +1,278 @@ +google.firestore.admin.v1.RestoreDatabaseRequest + */ +class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $backup = ''; + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * @type string $backup + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to restore the database in. Format is + * `projects/{project_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 project to restore the database in. Format is + * `projects/{project_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 ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php new file mode 100644 index 000000000000..9ef06f95585e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php @@ -0,0 +1,137 @@ +google.firestore.admin.v1.UpdateBackupScheduleRequest + */ +class UpdateBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_schedule = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateBackupScheduleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupSchedule($backupSchedule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule + * Required. The backup schedule to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null + */ + public function getBackupSchedule() + { + return $this->backup_schedule; + } + + public function hasBackupSchedule() + { + return isset($this->backup_schedule); + } + + public function clearBackupSchedule() + { + unset($this->backup_schedule); + } + + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var + * @return $this + */ + public function setBackupSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedule = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php new file mode 100644 index 000000000000..189e1d6c5a6c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.UpdateDatabaseMetadata + */ +class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php new file mode 100644 index 000000000000..3d9cfcf3df23 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php @@ -0,0 +1,137 @@ +google.firestore.admin.v1.UpdateDatabaseRequest + */ +class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The database to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\Database $database, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDatabase($database) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database $database + * Required. The database to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php new file mode 100644 index 000000000000..4c1e8af65c10 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php @@ -0,0 +1,139 @@ +google.firestore.admin.v1.UpdateFieldRequest + */ +class UpdateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\Field $field Required. The field to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\Field $field): self + { + return (new self()) + ->setField($field); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Field $field + * Required. The field to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->field = $var; + + return $this; + } + + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * 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); + } + + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php new file mode 100644 index 000000000000..4f57674f6424 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php @@ -0,0 +1,281 @@ +google.firestore.admin.v1.UserCreds + */ +class UserCreds extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $secure_password = ''; + protected $UserCredsIdentity; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the user creds were created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the user creds were last updated. + * @type int $state + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * @type string $secure_password + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $resource_identity + * Resource Identity descriptor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSecurePassword() + { + return $this->secure_password; + } + + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSecurePassword($var) + { + GPBUtil::checkString($var, True); + $this->secure_password = $var; + + return $this; + } + + /** + * Resource Identity descriptor. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * @return \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity|null + */ + public function getResourceIdentity() + { + return $this->readOneof(6); + } + + public function hasResourceIdentity() + { + return $this->hasOneof(6); + } + + /** + * Resource Identity descriptor. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $var + * @return $this + */ + public function setResourceIdentity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getUserCredsIdentity() + { + return $this->whichOneof("UserCredsIdentity"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php new file mode 100644 index 000000000000..43aae2282b0e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php @@ -0,0 +1,71 @@ +google.firestore.admin.v1.UserCreds.ResourceIdentity + */ +class ResourceIdentity extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $principal = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $principal + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPrincipal() + { + return $this->principal; + } + + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkString($var, True); + $this->principal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php new file mode 100644 index 000000000000..87e4f2a1a39b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.UserCreds.State + */ +class State +{ + /** + * The default value. Should not be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The user creds are enabled. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The user creds are disabled. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php new file mode 100644 index 000000000000..8aa07e17a56a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php @@ -0,0 +1,72 @@ +google.firestore.admin.v1.WeeklyRecurrence + */ +class WeeklyRecurrence extends \Google\Protobuf\Internal\Message +{ + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + */ + protected $day = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + * @return int + */ + public function getDay() + { + return $this->day; + } + + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + * @param int $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php new file mode 100644 index 000000000000..22e0d66b5189 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->bulkDeleteDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BulkDeleteDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + bulk_delete_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php new file mode 100644 index 000000000000..1fb08fa56f99 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php @@ -0,0 +1,125 @@ +setDatabase($formattedPitrSnapshotDatabase) + ->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->cloneDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + $formattedPitrSnapshotDatabase = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + clone_database_sample($formattedParent, $databaseId, $formattedPitrSnapshotDatabase); +} +// [END firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php new file mode 100644 index 000000000000..977286655c7b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->createBackupSchedule($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + create_backup_schedule_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php new file mode 100644 index 000000000000..783e18078ae7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->createDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + + create_database_sample($formattedParent, $databaseId); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php new file mode 100644 index 000000000000..698c28acb527 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setIndex($index); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->createIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $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 = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + create_index_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php new file mode 100644 index 000000000000..12f15789d40a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->createUserCreds($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + $userCredsId = '[USER_CREDS_ID]'; + + create_user_creds_sample($formattedParent, $userCredsId); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php new file mode 100644 index 000000000000..d1d6ca23d9fb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + delete_backup_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php new file mode 100644 index 000000000000..f63397852def --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( + '[PROJECT]', + '[DATABASE]', + '[BACKUP_SCHEDULE]' + ); + + delete_backup_schedule_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php new file mode 100644 index 000000000000..2c054985cc61 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->deleteDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + delete_database_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php new file mode 100644 index 000000000000..5100d4af099d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteIndex($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 = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + delete_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php new file mode 100644 index 000000000000..db1dfa9a341d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + delete_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php new file mode 100644 index 000000000000..2b7bb1a05207 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->disableUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + disable_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php new file mode 100644 index 000000000000..fff81717a1ec --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->enableUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + enable_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php new file mode 100644 index 000000000000..d74212e16a28 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php @@ -0,0 +1,94 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->exportDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + export_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php new file mode 100644 index 000000000000..fb0043c93703 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $firestoreAdminClient->getBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + get_backup_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php new file mode 100644 index 000000000000..42aabad3b2f8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->getBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( + '[PROJECT]', + '[DATABASE]', + '[BACKUP_SCHEDULE]' + ); + + get_backup_schedule_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php new file mode 100644 index 000000000000..39e4f8f513b9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Database $response */ + $response = $firestoreAdminClient->getDatabase($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + get_database_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php new file mode 100644 index 000000000000..c85dadbe1eb5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Field $response */ + $response = $firestoreAdminClient->getField($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 = FirestoreAdminClient::fieldName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[FIELD]' + ); + + get_field_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php new file mode 100644 index 000000000000..d87b6487a86e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Index $response */ + $response = $firestoreAdminClient->getIndex($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 = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + get_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php new file mode 100644 index 000000000000..0921c791681b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->getUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + get_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php new file mode 100644 index 000000000000..3bcd34ff43ae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->importDocuments($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + import_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php new file mode 100644 index 000000000000..e5fd7d370287 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListBackupSchedulesResponse $response */ + $response = $firestoreAdminClient->listBackupSchedules($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + list_backup_schedules_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php new file mode 100644 index 000000000000..18a8633f5fa1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListBackupsResponse $response */ + $response = $firestoreAdminClient->listBackups($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 = FirestoreAdminClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backups_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php new file mode 100644 index 000000000000..dbfcf54c34a4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListDatabasesResponse $response */ + $response = $firestoreAdminClient->listDatabases($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 = FirestoreAdminClient::projectName('[PROJECT]'); + + list_databases_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php new file mode 100644 index 000000000000..e0219706c327 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php @@ -0,0 +1,89 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreAdminClient->listFields($request); + + /** @var Field $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 = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_fields_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php new file mode 100644 index 000000000000..f3bac598fa14 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreAdminClient->listIndexes($request); + + /** @var Index $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 = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_indexes_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php new file mode 100644 index 000000000000..157d102fb508 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListUserCredsResponse $response */ + $response = $firestoreAdminClient->listUserCreds($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + list_user_creds_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php new file mode 100644 index 000000000000..cf835144108b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->resetUserPassword($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + reset_user_password_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php new file mode 100644 index 000000000000..98381e2f7c76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php @@ -0,0 +1,124 @@ +setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->restoreDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + $formattedBackup = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + restore_database_sample($formattedParent, $databaseId, $formattedBackup); +} +// [END firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php new file mode 100644 index 000000000000..a86c8f7e485f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php @@ -0,0 +1,59 @@ +setBackupSchedule($backupSchedule); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->updateBackupSchedule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php new file mode 100644 index 000000000000..075e9e0b9cb2 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php @@ -0,0 +1,71 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->updateDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php new file mode 100644 index 000000000000..ea5c384494ac --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php @@ -0,0 +1,122 @@ +setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->updateField($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Field $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 +{ + $fieldName = '[NAME]'; + + update_field_sample($fieldName); +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php new file mode 100644 index 000000000000..97f6dfe6af15 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php @@ -0,0 +1,1473 @@ + bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneDatabaseAsync(CloneDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupScheduleAsync(CreateBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatabaseAsync(CreateDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUserCredsAsync(CreateUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupScheduleAsync(DeleteBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatabaseAsync(DeleteDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUserCredsAsync(DeleteUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableUserCredsAsync(DisableUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface enableUserCredsAsync(EnableUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDocumentsAsync(ExportDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupScheduleAsync(GetBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatabaseAsync(GetDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFieldAsync(GetFieldRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUserCredsAsync(GetUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDocumentsAsync(ImportDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupSchedulesAsync(ListBackupSchedulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatabasesAsync(ListDatabasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFieldsAsync(ListFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUserCredsAsync(ListUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetUserPasswordAsync(ResetUserPasswordRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreDatabaseAsync(RestoreDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupScheduleAsync(UpdateBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDatabaseAsync(UpdateDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFieldAsync(UpdateFieldRequest $request, array $optionalArgs = []) + */ +final class FirestoreAdminClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $location, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'location' => $location, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backup_schedule resource. + * + * @param string $project + * @param string $database + * @param string $backupSchedule + * + * @return string The formatted backup_schedule resource. + */ + public static function backupScheduleName(string $project, string $database, string $backupSchedule): string + { + return self::getPathTemplate('backupSchedule')->render([ + 'project' => $project, + 'database' => $database, + 'backup_schedule' => $backupSchedule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * collection_group resource. + * + * @param string $project + * @param string $database + * @param string $collection + * + * @return string The formatted collection_group resource. + */ + public static function collectionGroupName(string $project, string $database, string $collection): string + { + return self::getPathTemplate('collectionGroup')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a database + * resource. + * + * @param string $project + * @param string $database + * + * @return string The formatted database resource. + */ + public static function databaseName(string $project, string $database): string + { + return self::getPathTemplate('database')->render([ + 'project' => $project, + 'database' => $database, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a field + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $field + * + * @return string The formatted field resource. + */ + public static function fieldName(string $project, string $database, string $collection, string $field): string + { + return self::getPathTemplate('field')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'field' => $field, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName(string $project, string $database, string $collection, string $index): string + { + return self::getPathTemplate('index')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'index' => $index, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a operation + * resource. + * + * @param string $project + * @param string $database + * @param string $operation + * + * @return string The formatted operation resource. + */ + public static function operationName(string $project, string $database, string $operation): string + { + return self::getPathTemplate('operation')->render([ + 'project' => $project, + 'database' => $database, + 'operation' => $operation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a user_creds + * resource. + * + * @param string $project + * @param string $database + * @param string $userCreds + * + * @return string The formatted user_creds resource. + */ + public static function userCredsName(string $project, string $database, string $userCreds): string + { + return self::getPathTemplate('userCreds')->render([ + 'project' => $project, + 'database' => $database, + 'user_creds' => $userCreds, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - backup: projects/{project}/locations/{location}/backups/{backup} + * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} + * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} + * - database: projects/{project}/databases/{database} + * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} + * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} + * - location: projects/{project}/locations/{location} + * - operation: projects/{project}/databases/{database}/operations/{operation} + * - project: projects/{project} + * - userCreds: projects/{project}/databases/{database}/userCreds/{user_creds} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'firestore.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Firestore\Admin\V1\FirestoreAdminClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FirestoreAdminClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. + * Documents created or updated after the underlying system starts to process + * the request will not be deleted. The bulk delete occurs in the background + * and its progress can be monitored and managed via the Operation resource + * that is created. + * + * For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + * The async variant is {@see FirestoreAdminClient::bulkDeleteDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/bulk_delete_documents.php + * + * @param BulkDeleteDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 bulkDeleteDocuments(BulkDeleteDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BulkDeleteDocuments', $request, $callOptions)->wait(); + } + + /** + * Creates a new database by cloning an existing one. + * + * The new database must be in the same cloud region or multi-region location + * as the existing database. This behaves similar to + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + * except instead of creating a new empty database, a new database is created + * with the database type, index configuration, and documents from an existing + * database. + * + * The [long-running operation][google.longrunning.Operation] can be used to + * track the progress of the clone, with the Operation's + * [metadata][google.longrunning.Operation.metadata] field type being the + * [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] type is the + * [Database][google.firestore.admin.v1.Database] if the clone was + * successful. The new database is not readable or writeable until the LRO has + * completed. + * + * The async variant is {@see FirestoreAdminClient::cloneDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/clone_database.php + * + * @param CloneDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 cloneDatabase(CloneDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CloneDatabase', $request, $callOptions)->wait(); + } + + /** + * Creates a backup schedule on a database. + * At most two backup schedules can be configured on a database, one daily + * backup schedule and one weekly backup schedule. + * + * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_backup_schedule.php + * + * @param CreateBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupSchedule(CreateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('CreateBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Create a database. + * + * The async variant is {@see FirestoreAdminClient::createDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_database.php + * + * @param CreateDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createDatabase(CreateDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDatabase', $request, $callOptions)->wait(); + } + + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be + * used to track the status of the creation. The metadata for the operation + * will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + * The async variant is {@see FirestoreAdminClient::createIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_index.php + * + * @param CreateIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); + } + + /** + * Create a user creds. + * + * The async variant is {@see FirestoreAdminClient::createUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_user_creds.php + * + * @param CreateUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUserCreds(CreateUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('CreateUserCreds', $request, $callOptions)->wait(); + } + + /** + * Deletes a backup. + * + * The async variant is {@see FirestoreAdminClient::deleteBackupAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Deletes a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::deleteBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_backup_schedule.php + * + * @param DeleteBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteBackupSchedule(DeleteBackupScheduleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Deletes a database. + * + * The async variant is {@see FirestoreAdminClient::deleteDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_database.php + * + * @param DeleteDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 deleteDatabase(DeleteDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDatabase', $request, $callOptions)->wait(); + } + + /** + * Deletes a composite index. + * + * The async variant is {@see FirestoreAdminClient::deleteIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_index.php + * + * @param DeleteIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteIndex(DeleteIndexRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); + } + + /** + * Deletes a user creds. + * + * The async variant is {@see FirestoreAdminClient::deleteUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_user_creds.php + * + * @param DeleteUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteUserCreds(DeleteUserCredsRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUserCreds', $request, $callOptions)->wait(); + } + + /** + * Disables a user creds. No-op if the user creds are already disabled. + * + * The async variant is {@see FirestoreAdminClient::disableUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/disable_user_creds.php + * + * @param DisableUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function disableUserCreds(DisableUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('DisableUserCreds', $request, $callOptions)->wait(); + } + + /** + * Enables a user creds. No-op if the user creds are already enabled. + * + * The async variant is {@see FirestoreAdminClient::enableUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/enable_user_creds.php + * + * @param EnableUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function enableUserCreds(EnableUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('EnableUserCreds', $request, $callOptions)->wait(); + } + + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore + * to another storage system, such as Google Cloud Storage. Recent updates to + * documents may not be reflected in the export. The export occurs in the + * background and its progress can be monitored and managed via the + * Operation resource that is created. The output of an export may only be + * used once the associated operation is done. If an export operation is + * cancelled before completion it may leave partial data behind in Google + * Cloud Storage. + * + * For more details on export behavior and output format, refer to: + * https://cloud.google.com/firestore/docs/manage-data/export-import + * + * The async variant is {@see FirestoreAdminClient::exportDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/export_documents.php + * + * @param ExportDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 exportDocuments(ExportDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportDocuments', $request, $callOptions)->wait(); + } + + /** + * Gets information about a backup. + * + * The async variant is {@see FirestoreAdminClient::getBackupAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::getBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_backup_schedule.php + * + * @param GetBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupSchedule(GetBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('GetBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Gets information about a database. + * + * The async variant is {@see FirestoreAdminClient::getDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_database.php + * + * @param GetDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Database + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDatabase(GetDatabaseRequest $request, array $callOptions = []): Database + { + return $this->startApiCall('GetDatabase', $request, $callOptions)->wait(); + } + + /** + * Gets the metadata and configuration for a Field. + * + * The async variant is {@see FirestoreAdminClient::getFieldAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_field.php + * + * @param GetFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Field + * + * @throws ApiException Thrown if the API call fails. + */ + public function getField(GetFieldRequest $request, array $callOptions = []): Field + { + return $this->startApiCall('GetField', $request, $callOptions)->wait(); + } + + /** + * Gets a composite index. + * + * The async variant is {@see FirestoreAdminClient::getIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_index.php + * + * @param GetIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Index + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIndex(GetIndexRequest $request, array $callOptions = []): Index + { + return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); + } + + /** + * Gets a user creds resource. Note that the returned resource does not + * contain the secret value itself. + * + * The async variant is {@see FirestoreAdminClient::getUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_user_creds.php + * + * @param GetUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUserCreds(GetUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('GetUserCreds', $request, $callOptions)->wait(); + } + + /** + * Imports documents into Google Cloud Firestore. Existing documents with the + * same name are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportDocuments operation is cancelled, it is possible + * that a subset of the data has already been imported to Cloud Firestore. + * + * The async variant is {@see FirestoreAdminClient::importDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/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(); + } + + /** + * List backup schedules. + * + * The async variant is {@see FirestoreAdminClient::listBackupSchedulesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_backup_schedules.php + * + * @param ListBackupSchedulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListBackupSchedulesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupSchedules(ListBackupSchedulesRequest $request, array $callOptions = []): ListBackupSchedulesResponse + { + return $this->startApiCall('ListBackupSchedules', $request, $callOptions)->wait(); + } + + /** + * Lists all the backups. + * + * The async variant is {@see FirestoreAdminClient::listBackupsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListBackupsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackups(ListBackupsRequest $request, array $callOptions = []): ListBackupsResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions)->wait(); + } + + /** + * List all the databases in the project. + * + * The async variant is {@see FirestoreAdminClient::listDatabasesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_databases.php + * + * @param ListDatabasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListDatabasesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDatabases(ListDatabasesRequest $request, array $callOptions = []): ListDatabasesResponse + { + return $this->startApiCall('ListDatabases', $request, $callOptions)->wait(); + } + + /** + * Lists the field configuration and metadata for this database. + * + * Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with the filter set to `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * The async variant is {@see FirestoreAdminClient::listFieldsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_fields.php + * + * @param ListFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listFields(ListFieldsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFields', $request, $callOptions); + } + + /** + * Lists composite indexes. + * + * The async variant is {@see FirestoreAdminClient::listIndexesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_indexes.php + * + * @param ListIndexesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIndexes', $request, $callOptions); + } + + /** + * List all user creds in the database. Note that the returned resource + * does not contain the secret value itself. + * + * The async variant is {@see FirestoreAdminClient::listUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_user_creds.php + * + * @param ListUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListUserCredsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUserCreds(ListUserCredsRequest $request, array $callOptions = []): ListUserCredsResponse + { + return $this->startApiCall('ListUserCreds', $request, $callOptions)->wait(); + } + + /** + * Resets the password of a user creds. + * + * The async variant is {@see FirestoreAdminClient::resetUserPasswordAsync()} . + * + * @example samples/V1/FirestoreAdminClient/reset_user_password.php + * + * @param ResetUserPasswordRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetUserPassword(ResetUserPasswordRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('ResetUserPassword', $request, $callOptions)->wait(); + } + + /** + * Creates a new database by restoring from an existing backup. + * + * The new database must be in the same cloud region or multi-region location + * as the existing backup. This behaves similar to + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + * except instead of creating a new empty database, a new database is created + * with the database type, index configuration, and documents from an existing + * backup. + * + * The [long-running operation][google.longrunning.Operation] can be used to + * track the progress of the restore, with the Operation's + * [metadata][google.longrunning.Operation.metadata] field type being the + * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] type is the + * [Database][google.firestore.admin.v1.Database] if the restore was + * successful. The new database is not readable or writeable until the LRO has + * completed. + * + * The async variant is {@see FirestoreAdminClient::restoreDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/restore_database.php + * + * @param RestoreDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 restoreDatabase(RestoreDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreDatabase', $request, $callOptions)->wait(); + } + + /** + * Updates a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::updateBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_backup_schedule.php + * + * @param UpdateBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupSchedule(UpdateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('UpdateBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Updates a database. + * + * The async variant is {@see FirestoreAdminClient::updateDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_database.php + * + * @param UpdateDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateDatabase(UpdateDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDatabase', $request, $callOptions)->wait(); + } + + /** + * Updates a field configuration. Currently, field updates apply only to + * single field index configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] + * should provide a field mask to avoid changing any configuration that the + * caller isn't aware of. The field mask should be specified as: `{ paths: + * "index_config" }`. + * + * This call returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be + * used to track the status of the field update. The metadata for the + * operation will be the type + * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + * To configure the default field settings for the database, use + * the special `Field` with resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + * The async variant is {@see FirestoreAdminClient::updateFieldAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_field.php + * + * @param UpdateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 updateField(UpdateFieldRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateField', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..dbbc7871bacb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json @@ -0,0 +1,178 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.firestore.admin.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", + "services": { + "FirestoreAdmin": { + "clients": { + "grpc": { + "libraryClient": "FirestoreAdminGapicClient", + "rpcs": { + "BulkDeleteDocuments": { + "methods": [ + "bulkDeleteDocuments" + ] + }, + "CloneDatabase": { + "methods": [ + "cloneDatabase" + ] + }, + "CreateBackupSchedule": { + "methods": [ + "createBackupSchedule" + ] + }, + "CreateDatabase": { + "methods": [ + "createDatabase" + ] + }, + "CreateIndex": { + "methods": [ + "createIndex" + ] + }, + "CreateUserCreds": { + "methods": [ + "createUserCreds" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteBackupSchedule": { + "methods": [ + "deleteBackupSchedule" + ] + }, + "DeleteDatabase": { + "methods": [ + "deleteDatabase" + ] + }, + "DeleteIndex": { + "methods": [ + "deleteIndex" + ] + }, + "DeleteUserCreds": { + "methods": [ + "deleteUserCreds" + ] + }, + "DisableUserCreds": { + "methods": [ + "disableUserCreds" + ] + }, + "EnableUserCreds": { + "methods": [ + "enableUserCreds" + ] + }, + "ExportDocuments": { + "methods": [ + "exportDocuments" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupSchedule": { + "methods": [ + "getBackupSchedule" + ] + }, + "GetDatabase": { + "methods": [ + "getDatabase" + ] + }, + "GetField": { + "methods": [ + "getField" + ] + }, + "GetIndex": { + "methods": [ + "getIndex" + ] + }, + "GetUserCreds": { + "methods": [ + "getUserCreds" + ] + }, + "ImportDocuments": { + "methods": [ + "importDocuments" + ] + }, + "ListBackupSchedules": { + "methods": [ + "listBackupSchedules" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListDatabases": { + "methods": [ + "listDatabases" + ] + }, + "ListFields": { + "methods": [ + "listFields" + ] + }, + "ListIndexes": { + "methods": [ + "listIndexes" + ] + }, + "ListUserCreds": { + "methods": [ + "listUserCreds" + ] + }, + "ResetUserPassword": { + "methods": [ + "resetUserPassword" + ] + }, + "RestoreDatabase": { + "methods": [ + "restoreDatabase" + ] + }, + "UpdateBackupSchedule": { + "methods": [ + "updateBackupSchedule" + ] + }, + "UpdateDatabase": { + "methods": [ + "updateDatabase" + ] + }, + "UpdateField": { + "methods": [ + "updateField" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json new file mode 100644 index 000000000000..5cbb0d1c138f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json @@ -0,0 +1,226 @@ +{ + "interfaces": { + "google.firestore.admin.v1.FirestoreAdmin": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [], + "no_retry_3_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BulkDeleteDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CloneDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DisableUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "EnableUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetField": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ImportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBackupSchedules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDatabases": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFields": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResetUserPassword": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RestoreDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php new file mode 100644 index 000000000000..c3127617cb45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php @@ -0,0 +1,523 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'BulkDeleteDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CloneDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CloneDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getPitrSnapshot', + 'getDatabase', + ], + 'matchers' => [], + ], + [ + 'keyName' => 'database_id', + 'fieldAccessors' => [ + 'getPitrSnapshot', + 'getDatabase', + ], + 'matchers' => [], + ], + ], + ], + 'CreateDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CreateDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\DeleteDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RestoreDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\RestoreDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'database.name', + 'fieldAccessors' => [ + 'getDatabase', + 'getName', + ], + ], + ], + ], + 'UpdateField' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'field.name', + 'fieldAccessors' => [ + 'getField', + 'getName', + ], + ], + ], + ], + 'CreateBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DisableUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EnableUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDatabase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Database', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Field', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Index', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupSchedules' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatabases' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFields' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFields', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListUserCredsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ResetUserPassword' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'backup_schedule.name', + 'fieldAccessors' => [ + 'getBackupSchedule', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', + 'backupSchedule' => 'projects/{project}/databases/{database}/backupSchedules/{backup_schedule}', + 'collectionGroup' => 'projects/{project}/databases/{database}/collectionGroups/{collection}', + 'database' => 'projects/{project}/databases/{database}', + 'field' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}', + 'index' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}', + 'location' => 'projects/{project}/locations/{location}', + 'operation' => 'projects/{project}/databases/{database}/operations/{operation}', + 'project' => 'projects/{project}', + 'userCreds' => 'projects/{project}/databases/{database}/userCreds/{user_creds}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php new file mode 100644 index 000000000000..a2b82a32fc0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php @@ -0,0 +1,452 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'BulkDeleteDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:bulkDeleteDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CloneDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases:clone', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupSchedule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', + 'body' => 'backup_schedule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases', + 'body' => 'database', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'database_id', + ], + ], + 'CreateIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'body' => 'index', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', + 'body' => 'user_creds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'user_creds_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupSchedule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDatabase' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserCreds' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DisableUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:disable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EnableUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:enable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupSchedule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDatabase' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetField' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUserCreds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupSchedules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatabases' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/databases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFields' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserCreds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetUserPassword' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RestoreDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases:restore', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBackupSchedule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}', + 'body' => 'backup_schedule', + 'placeholders' => [ + 'backup_schedule.name' => [ + 'getters' => [ + 'getBackupSchedule', + 'getName', + ], + ], + ], + ], + 'UpdateDatabase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', + 'body' => 'database', + 'placeholders' => [ + 'database.name' => [ + 'getters' => [ + 'getDatabase', + 'getName', + ], + ], + ], + ], + 'UpdateField' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'body' => 'field', + 'placeholders' => [ + 'field.name' => [ + 'getters' => [ + 'getField', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php new file mode 100644 index 000000000000..158d07508900 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php @@ -0,0 +1,2977 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreAdminClient($options); + } + + /** @test */ + public function bulkDeleteDocumentsTest() + { + $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/bulkDeleteDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocuments($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + $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 bulkDeleteDocumentsExceptionTest() + { + $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/bulkDeleteDocumentsTest'); + $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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + 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 cloneDatabaseTest() + { + $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/cloneDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cloneDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $pitrSnapshot = new PitrSnapshot(); + $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $pitrSnapshot->setDatabase($pitrSnapshotDatabase); + $pitrSnapshotSnapshotTime = new Timestamp(); + $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + $response = $gapicClient->cloneDatabase($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.firestore.admin.v1.FirestoreAdmin/CloneDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $actualValue = $actualApiRequestObject->getPitrSnapshot(); + $this->assertProtobufEquals($pitrSnapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); + $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 cloneDatabaseExceptionTest() + { + $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/cloneDatabaseTest'); + $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->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $pitrSnapshot = new PitrSnapshot(); + $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $pitrSnapshot->setDatabase($pitrSnapshotDatabase); + $pitrSnapshotSnapshotTime = new Timestamp(); + $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + $response = $gapicClient->cloneDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); + 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 createBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $backupSchedule = new BackupSchedule(); + $request = (new CreateBackupScheduleRequest()) + ->setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + $response = $gapicClient->createBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBackupSchedule(); + $this->assertProtobufEquals($backupSchedule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->databaseName('[PROJECT]', '[DATABASE]'); + $backupSchedule = new BackupSchedule(); + $request = (new CreateBackupScheduleRequest()) + ->setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + try { + $gapicClient->createBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDatabaseTest() + { + $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/createDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $database = new Database(); + $databaseId = 'databaseId816491103'; + $request = (new CreateDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + $response = $gapicClient->createDatabase($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.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); + $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 createDatabaseExceptionTest() + { + $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/createDatabaseTest'); + $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->projectName('[PROJECT]'); + $database = new Database(); + $databaseId = 'databaseId816491103'; + $request = (new CreateDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + $response = $gapicClient->createDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); + 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 createIndexTest() + { + $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/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $multikey = true; + $shardCount = 495377042; + $unique = false; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $expectedResponse->setMultikey($multikey); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUnique($unique); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($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.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + $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 createIndexExceptionTest() + { + $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/createIndexTest'); + $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + 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 createUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $userCreds = new UserCreds(); + $userCredsId = 'userCredsId1873704105'; + $request = (new CreateUserCredsRequest()) + ->setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + $response = $gapicClient->createUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserCreds(); + $this->assertProtobufEquals($userCreds, $actualValue); + $actualValue = $actualRequestObject->getUserCredsId(); + $this->assertProtobufEquals($userCredsId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->databaseName('[PROJECT]', '[DATABASE]'); + $userCreds = new UserCreds(); + $userCredsId = 'userCredsId1873704105'; + $request = (new CreateUserCredsRequest()) + ->setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + try { + $gapicClient->createUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $gapicClient->deleteBackup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new DeleteBackupScheduleRequest()) + ->setName($formattedName); + $gapicClient->deleteBackupSchedule($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new DeleteBackupScheduleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDatabaseTest() + { + $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/deleteDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Database(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new DeleteDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatabase($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.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); + $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 deleteDatabaseExceptionTest() + { + $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/deleteDatabaseTest'); + $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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new DeleteDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); + 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 deleteIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $gapicClient->deleteIndex($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteIndex($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DeleteUserCredsRequest()) + ->setName($formattedName); + $gapicClient->deleteUserCreds($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DeleteUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DisableUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->disableUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DisableUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->disableUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enableUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new EnableUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->enableUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enableUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new EnableUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->enableUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportDocumentsTest() + { + $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/exportDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $outputUriPrefix2 = 'outputUriPrefix2-377757258'; + $expectedResponse = new ExportDocumentsResponse(); + $expectedResponse->setOutputUriPrefix($outputUriPrefix2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ExportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDocuments($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.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + $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 exportDocumentsExceptionTest() + { + $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/exportDocumentsTest'); + $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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ExportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + 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 getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $database = 'database1789464955'; + $databaseUid = 'databaseUid-458567796'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setDatabase($database); + $expectedResponse->setDatabaseUid($databaseUid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new GetBackupScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new GetBackupScheduleRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatabaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new GetDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getDatabase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatabaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new GetDatabaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getDatabase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Field(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + $request = (new GetFieldRequest()) + ->setName($formattedName); + $response = $gapicClient->getField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + $request = (new GetFieldRequest()) + ->setName($formattedName); + try { + $gapicClient->getField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $multikey = true; + $shardCount = 495377042; + $unique = false; + $expectedResponse = new Index(); + $expectedResponse->setName($name2); + $expectedResponse->setMultikey($multikey); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUnique($unique); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->getIndex($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->getIndex($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new GetUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->getUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new GetUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->getUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 GPBEmpty(); + $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 + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ImportDocumentsRequest()) + ->setName($formattedName); + $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.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $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 + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ImportDocumentsRequest()) + ->setName($formattedName); + $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 listBackupSchedulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListBackupSchedulesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListBackupSchedulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupSchedules($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupSchedulesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListBackupSchedulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupSchedules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListBackupsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatabasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListDatabasesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListDatabasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDatabases($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatabasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->projectName('[PROJECT]'); + $request = (new ListDatabasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDatabases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fieldsElement = new Field(); + $fields = [ + $fieldsElement, + ]; + $expectedResponse = new ListFieldsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFields($fields); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListFieldsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFields($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListFieldsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFields($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexesElement = new Index(); + $indexes = [ + $indexesElement, + ]; + $expectedResponse = new ListIndexesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexes($indexes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIndexes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIndexes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListUserCredsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListUserCredsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListUserCredsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetUserPasswordTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new ResetUserPasswordRequest()) + ->setName($formattedName); + $response = $gapicClient->resetUserPassword($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetUserPasswordExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new ResetUserPasswordRequest()) + ->setName($formattedName); + try { + $gapicClient->resetUserPassword($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreDatabaseTest() + { + $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/restoreDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new RestoreDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + $response = $gapicClient->restoreDatabase($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.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($formattedBackup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); + $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 restoreDatabaseExceptionTest() + { + $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/restoreDatabaseTest'); + $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->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new RestoreDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + $response = $gapicClient->restoreDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); + 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 updateBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $backupSchedule = new BackupSchedule(); + $request = (new UpdateBackupScheduleRequest()) + ->setBackupSchedule($backupSchedule); + $response = $gapicClient->updateBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getBackupSchedule(); + $this->assertProtobufEquals($backupSchedule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 + $backupSchedule = new BackupSchedule(); + $request = (new UpdateBackupScheduleRequest()) + ->setBackupSchedule($backupSchedule); + try { + $gapicClient->updateBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDatabaseTest() + { + $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/updateDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $database = new Database(); + $request = (new UpdateDatabaseRequest()) + ->setDatabase($database); + $response = $gapicClient->updateDatabase($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.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + $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 updateDatabaseExceptionTest() + { + $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/updateDatabaseTest'); + $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 + $database = new Database(); + $request = (new UpdateDatabaseRequest()) + ->setDatabase($database); + $response = $gapicClient->updateDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + 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 updateFieldTest() + { + $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/updateFieldTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Field(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFieldTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + $response = $gapicClient->updateField($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.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getField(); + $this->assertProtobufEquals($field, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + $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 updateFieldExceptionTest() + { + $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/updateFieldTest'); + $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 + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + $response = $gapicClient->updateField($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + 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 bulkDeleteDocumentsAsyncTest() + { + $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/bulkDeleteDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocumentsAsync($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + $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/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php new file mode 100644 index 000000000000..b1b788bc4187 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xDD\x03\x0A,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\"\xBE\x01\x0A\x11AggregationResult\x12U\x0A\x10aggregate_fields\x18\x02 \x03(\x0B2;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1AR\x0A\x14AggregateFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xCE\x01\x0A\x17com.google.firestore.v1B\x16AggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php new file mode 100644 index 000000000000..a7f1ca1fe6ef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x93\x03\x0A&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\x0A\x0BBitSequence\x12\x0E\x0A\x06bitmap\x18\x01 \x01(\x0C\x12\x0F\x0A\x07padding\x18\x02 \x01(\x05\"Q\x0A\x0BBloomFilter\x12.\x0A\x04bits\x18\x01 \x01(\x0B2 .google.firestore.v1.BitSequence\x12\x12\x0A\x0Ahash_count\x18\x02 \x01(\x05B\xC8\x01\x0A\x17com.google.firestore.v1B\x10BloomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php new file mode 100644 index 000000000000..7e8aea52f92e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBD\x05\x0A google/firestore/v1/common.proto\x12\x13google.firestore.v1\"#\x0A\x0CDocumentMask\x12\x13\x0A\x0Bfield_paths\x18\x01 \x03(\x09\"e\x0A\x0CPrecondition\x12\x10\x0A\x06exists\x18\x01 \x01(\x08H\x00\x121\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x10\x0A\x0Econdition_type\"\xA9\x02\x0A\x12TransactionOptions\x12E\x0A\x09read_only\x18\x02 \x01(\x0B20.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\x0A\x0Aread_write\x18\x03 \x01(\x0B21.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1A&\x0A\x09ReadWrite\x12\x19\x0A\x11retry_transaction\x18\x01 \x01(\x0C\x1AS\x0A\x08ReadOnly\x12/\x0A\x09read_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selectorB\x06\x0A\x04modeB\xC3\x01\x0A\x17com.google.firestore.v1B\x0BCommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php new file mode 100644 index 000000000000..64e7b3cca1d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x9E\x0F\x0A\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x18google/type/latlng.proto\"\x80\x02\x0A\x08Document\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x129\x0A\x06fields\x18\x02 \x03(\x0B2).google.firestore.v1.Document.FieldsEntry\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xE5\x04\x0A\x05Value\x120\x0A\x0Anull_value\x18\x0B \x01(\x0E2\x1A.google.protobuf.NullValueH\x00\x12\x17\x0A\x0Dboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\x0A\x0Cdouble_value\x18\x03 \x01(\x01H\x00\x125\x0A\x0Ftimestamp_value\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x16\x0A\x0Cstring_value\x18\x11 \x01(\x09H\x00\x12\x15\x0A\x0Bbytes_value\x18\x12 \x01(\x0CH\x00\x12\x19\x0A\x0Freference_value\x18\x05 \x01(\x09H\x00\x12.\x0A\x0Fgeo_point_value\x18\x08 \x01(\x0B2\x13.google.type.LatLngH\x00\x126\x0A\x0Barray_value\x18\x09 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x122\x0A\x09map_value\x18\x06 \x01(\x0B2\x1D.google.firestore.v1.MapValueH\x00\x12\x1F\x0A\x15field_reference_value\x18\x13 \x01(\x09H\x00\x12\"\x0A\x18variable_reference_value\x18\x16 \x01(\x09H\x00\x127\x0A\x0Efunction_value\x18\x14 \x01(\x0B2\x1D.google.firestore.v1.FunctionH\x00\x127\x0A\x0Epipeline_value\x18\x15 \x01(\x0B2\x1D.google.firestore.v1.PipelineH\x00B\x0C\x0A\x0Avalue_type\"8\x0A\x0AArrayValue\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\"\x90\x01\x0A\x08MapValue\x129\x0A\x06fields\x18\x01 \x03(\x0B2).google.firestore.v1.MapValue.FieldsEntry\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xDA\x01\x0A\x08Function\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12@\x0A\x07options\x18\x03 \x03(\x0B2*.google.firestore.v1.Function.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xA4\x02\x0A\x08Pipeline\x128\x0A\x06stages\x18\x01 \x03(\x0B2#.google.firestore.v1.Pipeline.StageB\x03\xE0A\x02\x1A\xDD\x01\x0A\x05Stage\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12F\x0A\x07options\x18\x03 \x03(\x0B20.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php new file mode 100644 index 000000000000..bd54bc8f349b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBF\x02\x0A'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\"2\x0A\x0CExplainStats\x12\"\x0A\x04data\x18\x01 \x01(\x0B2\x14.google.protobuf.AnyB\xC2\x01\x0A\x17com.google.firestore.v1B\x11ExplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php new file mode 100644 index 000000000000..d18d15619ddc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + "\x0A\xCFT\x0A#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x18google/api/routing.proto\x1A,google/firestore/v1/aggregation_result.proto\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A'google/firestore/v1/explain_stats.proto\x1A\"google/firestore/v1/pipeline.proto\x1A\x1Fgoogle/firestore/v1/query.proto\x1A'google/firestore/v1/query_profile.proto\x1A\x1Fgoogle/firestore/v1/write.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xB8\x01\x0A\x12GetDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x03 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xBB\x02\x0A\x14ListDocumentsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x06 \x01(\x09B\x03\xE0A\x01\x124\x0A\x04mask\x18\x07 \x01(\x0B2!.google.firestore.v1.DocumentMaskB\x03\xE0A\x01\x12\x15\x0A\x0Btransaction\x18\x08 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x14\x0A\x0Cshow_missing\x18\x0C \x01(\x08B\x16\x0A\x14consistency_selector\"b\x0A\x15ListDocumentsResponse\x120\x0A\x09documents\x18\x01 \x03(\x0B2\x1D.google.firestore.v1.Document\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC4\x01\x0A\x15CreateDocumentRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdocument_id\x18\x03 \x01(\x09\x124\x0A\x08document\x18\x04 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x12/\x0A\x04mask\x18\x05 \x01(\x0B2!.google.firestore.v1.DocumentMask\"\xF3\x01\x0A\x15UpdateDocumentRequest\x124\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x126\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.Precondition\"g\x0A\x15DeleteDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x10current_document\x18\x02 \x01(\x0B2!.google.firestore.v1.Precondition\"\x99\x02\x0A\x18BatchGetDocumentsRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x00\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x00\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xAC\x01\x0A\x19BatchGetDocumentsResponse\x12.\x0A\x05found\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x11\x0A\x07missing\x18\x02 \x01(\x09H\x00\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x08\x0A\x06result\"j\x0A\x17BeginTransactionRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x07options\x18\x02 \x01(\x0B2'.google.firestore.v1.TransactionOptions\"/\x0A\x18BeginTransactionResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\"g\x0A\x0DCommitRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\"z\x0A\x0ECommitResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"B\x0A\x0FRollbackRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Btransaction\x18\x02 \x01(\x0CB\x03\xE0A\x02\"\xDD\x02\x0A\x0FRunQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\x87\x02\x0A\x10RunQueryResponse\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x17\x0A\x0Fskipped_results\x18\x04 \x01(\x05\x12\x0E\x0A\x04done\x18\x06 \x01(\x08H\x00\x12<\x0A\x0Fexplain_metrics\x18\x0B \x01(\x0B2#.google.firestore.v1.ExplainMetricsB\x17\x0A\x15continuation_selector\"\xAC\x02\x0A\x16ExecutePipelineRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12F\x0A\x13structured_pipeline\x18\x02 \x01(\x0B2'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0F\x0A\x0Dpipeline_typeB\x16\x0A\x14consistency_selector\"\xCC\x01\x0A\x17ExecutePipelineResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\x12.\x0A\x07results\x18\x02 \x03(\x0B2\x1D.google.firestore.v1.Document\x122\x0A\x0Eexecution_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x128\x0A\x0Dexplain_stats\x18\x04 \x01(\x0B2!.google.firestore.v1.ExplainStats\"\xFF\x02\x0A\x1ARunAggregationQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x1Cstructured_aggregation_query\x18\x02 \x01(\x0B2/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x08 \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\xD7\x01\x0A\x1BRunAggregationQueryResponse\x126\x0A\x06result\x18\x01 \x01(\x0B2&.google.firestore.v1.AggregationResult\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12<\x0A\x0Fexplain_metrics\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainMetrics\"\x85\x02\x0A\x15PartitionQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x17\x0A\x0Fpartition_count\x18\x03 \x01(\x03\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"b\x0A\x16PartitionQueryResponse\x12/\x0A\x0Apartitions\x18\x01 \x03(\x0B2\x1B.google.firestore.v1.Cursor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xE8\x01\x0A\x0CWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09stream_id\x18\x02 \x01(\x09\x12*\x0A\x06writes\x18\x03 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x14\x0A\x0Cstream_token\x18\x04 \x01(\x0C\x12=\x0A\x06labels\x18\x05 \x03(\x0B2-.google.firestore.v1.WriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA2\x01\x0A\x0DWriteResponse\x12\x11\x0A\x09stream_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cstream_token\x18\x02 \x01(\x0C\x127\x0A\x0Dwrite_results\x18\x03 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xF2\x01\x0A\x0DListenRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x121\x0A\x0Aadd_target\x18\x02 \x01(\x0B2\x1B.google.firestore.v1.TargetH\x00\x12\x17\x0A\x0Dremove_target\x18\x03 \x01(\x05H\x00\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.firestore.v1.ListenRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x0F\x0A\x0Dtarget_change\"\xD5\x02\x0A\x0EListenResponse\x12:\x0A\x0Dtarget_change\x18\x02 \x01(\x0B2!.google.firestore.v1.TargetChangeH\x00\x12>\x0A\x0Fdocument_change\x18\x03 \x01(\x0B2#.google.firestore.v1.DocumentChangeH\x00\x12>\x0A\x0Fdocument_delete\x18\x04 \x01(\x0B2#.google.firestore.v1.DocumentDeleteH\x00\x12>\x0A\x0Fdocument_remove\x18\x06 \x01(\x0B2#.google.firestore.v1.DocumentRemoveH\x00\x126\x0A\x06filter\x18\x05 \x01(\x0B2\$.google.firestore.v1.ExistenceFilterH\x00B\x0F\x0A\x0Dresponse_type\"\xD6\x03\x0A\x06Target\x128\x0A\x05query\x18\x02 \x01(\x0B2'.google.firestore.v1.Target.QueryTargetH\x00\x12@\x0A\x09documents\x18\x03 \x01(\x0B2+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\x0A\x0Cresume_token\x18\x04 \x01(\x0CH\x01\x12/\x0A\x09read_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12\x11\x0A\x09target_id\x18\x05 \x01(\x05\x12\x0C\x0A\x04once\x18\x06 \x01(\x08\x123\x0A\x0Eexpected_count\x18\x0C \x01(\x0B2\x1B.google.protobuf.Int32Value\x1A\$\x0A\x0FDocumentsTarget\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x1Am\x0A\x0BQueryTarget\x12\x0E\x0A\x06parent\x18\x01 \x01(\x09\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00B\x0C\x0A\x0Aquery_typeB\x0D\x0A\x0Btarget_typeB\x0D\x0A\x0Bresume_type\"\xAA\x02\x0A\x0CTargetChange\x12N\x0A\x12target_change_type\x18\x01 \x01(\x0E22.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\x0A\x0Atarget_ids\x18\x02 \x03(\x05\x12!\x0A\x05cause\x18\x03 \x01(\x0B2\x12.google.rpc.Status\x12\x14\x0A\x0Cresume_token\x18\x04 \x01(\x0C\x12-\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\"N\x0A\x10TargetChangeType\x12\x0D\x0A\x09NO_CHANGE\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0B\x0A\x07CURRENT\x10\x03\x12\x09\x0A\x05RESET\x10\x04\"\x9F\x01\x0A\x18ListCollectionIdsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12/\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"L\x0A\x19ListCollectionIdsResponse\x12\x16\x0A\x0Ecollection_ids\x18\x01 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC9\x01\x0A\x11BatchWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12B\x0A\x06labels\x18\x03 \x03(\x0B22.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"q\x0A\x12BatchWriteResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12\"\x0A\x06status\x18\x02 \x03(\x0B2\x12.google.rpc.Status2\xFB\x1B\x0A\x09Firestore\x12\x8F\x01\x0A\x0BGetDocument\x12'.google.firestore.v1.GetDocumentRequest\x1A\x1D.google.firestore.v1.Document\"8\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/databases/*/documents/*/**}\x12\xF5\x01\x0A\x0DListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1A*.google.firestore.v1.ListDocumentsResponse\"\x8C\x01\x82\xD3\xE4\x93\x02\x85\x01\x12B/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xBF\x01\x0A\x0EUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1A\x1D.google.firestore.v1.Document\"b\xDAA\x14document,update_mask\x82\xD3\xE4\x93\x02E29/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08document\x12\x95\x01\x0A\x0EDeleteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xB9\x01\x0A\x11BatchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1A..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xC7\x01\x0A\x10BeginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1A-.google.firestore.v1.BeginTransactionResponse\"V\xDAA\x08database\x82\xD3\xE4\x93\x02E\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xA6\x01\x0A\x06Commit\x12\".google.firestore.v1.CommitRequest\x1A#.google.firestore.v1.CommitResponse\"S\xDAA\x0Fdatabase,writes\x82\xD3\xE4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xA4\x01\x0A\x08Rollback\x12\$.google.firestore.v1.RollbackRequest\x1A\x16.google.protobuf.Empty\"Z\xDAA\x14database,transaction\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xDF\x01\x0A\x08RunQuery\x12\$.google.firestore.v1.RunQueryRequest\x1A%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xD3\xE4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9E\x02\x0A\x0FExecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1A,.google.firestore.v1.ExecutePipelineResponse\"\xAD\x01\x82\xD3\xE4\x93\x02D\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8A\xD3\xE4\x93\x02]\x12&\x0A\x08database\x12\x1Aprojects/{project_id=*}/**\x123\x0A\x08database\x12'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\x0A\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1A0.google.firestore.v1.RunAggregationQueryResponse\"\x9A\x01\x82\xD3\xE4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xFC\x01\x0A\x0EPartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1A+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xD3\xE4\x93\x02\x89\x01\"internalAddGeneratedFile( + "\x0A\x92\x04\x0A\"google/firestore/v1/pipeline.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\"\xE2\x01\x0A\x12StructuredPipeline\x124\x0A\x08pipeline\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.PipelineB\x03\xE0A\x02\x12J\x0A\x07options\x18\x02 \x03(\x0B24.google.firestore.v1.StructuredPipeline.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DPipelineProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php new file mode 100644 index 000000000000..7b9b9c57d1aa --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC3\x1C\x0A\x1Fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\x1A\x1Egoogle/protobuf/wrappers.proto\"\xF8\x13\x0A\x0FStructuredQuery\x12?\x0A\x06select\x18\x01 \x01(\x0B2/.google.firestore.v1.StructuredQuery.Projection\x12E\x0A\x04from\x18\x02 \x03(\x0B27.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\x0A\x05where\x18\x03 \x01(\x0B2+.google.firestore.v1.StructuredQuery.Filter\x12<\x0A\x08order_by\x18\x04 \x03(\x0B2*.google.firestore.v1.StructuredQuery.Order\x12-\x0A\x08start_at\x18\x07 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12+\x0A\x06end_at\x18\x08 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12\x0E\x0A\x06offset\x18\x06 \x01(\x05\x12*\x0A\x05limit\x18\x05 \x01(\x0B2\x1B.google.protobuf.Int32Value\x12K\x0A\x0Cfind_nearest\x18\x09 \x01(\x0B20.google.firestore.v1.StructuredQuery.FindNearestB\x03\xE0A\x01\x1AD\x0A\x12CollectionSelector\x12\x15\x0A\x0Dcollection_id\x18\x02 \x01(\x09\x12\x17\x0A\x0Fall_descendants\x18\x03 \x01(\x08\x1A\xFD\x01\x0A\x06Filter\x12P\x0A\x10composite_filter\x18\x01 \x01(\x0B24.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\x0A\x0Cfield_filter\x18\x02 \x01(\x0B20.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\x0A\x0Cunary_filter\x18\x03 \x01(\x0B20.google.firestore.v1.StructuredQuery.UnaryFilterH\x00B\x0D\x0A\x0Bfilter_type\x1A\xD1\x01\x0A\x0FCompositeFilter\x12I\x0A\x02op\x18\x01 \x01(\x0E2=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\x0A\x07filters\x18\x02 \x03(\x0B2+.google.firestore.v1.StructuredQuery.Filter\"5\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\x0A\x03AND\x10\x01\x12\x06\x0A\x02OR\x10\x02\x1A\x98\x03\x0A\x0BFieldFilter\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12E\x0A\x02op\x18\x02 \x01(\x0E29.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\x0A\x05value\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.Value\"\xD2\x01\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LESS_THAN\x10\x01\x12\x16\x0A\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\x0A\x0CGREATER_THAN\x10\x03\x12\x19\x0A\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\x09\x0A\x05EQUAL\x10\x05\x12\x0D\x0A\x09NOT_EQUAL\x10\x06\x12\x12\x0A\x0EARRAY_CONTAINS\x10\x07\x12\x06\x0A\x02IN\x10\x08\x12\x16\x0A\x12ARRAY_CONTAINS_ANY\x10\x09\x12\x0A\x0A\x06NOT_IN\x10\x0A\x1A\x8A\x02\x0A\x0BUnaryFilter\x12E\x0A\x02op\x18\x01 \x01(\x0E29.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12D\x0A\x05field\x18\x02 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06IS_NAN\x10\x02\x12\x0B\x0A\x07IS_NULL\x10\x03\x12\x0E\x0A\x0AIS_NOT_NAN\x10\x04\x12\x0F\x0A\x0BIS_NOT_NULL\x10\x05B\x0E\x0A\x0Coperand_type\x1A\x8E\x01\x0A\x05Order\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12A\x0A\x09direction\x18\x02 \x01(\x0E2..google.firestore.v1.StructuredQuery.Direction\x1A\$\x0A\x0EFieldReference\x12\x12\x0A\x0Afield_path\x18\x02 \x01(\x09\x1AQ\x0A\x0AProjection\x12C\x0A\x06fields\x18\x02 \x03(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1A\xEA\x03\x0A\x0BFindNearest\x12N\x0A\x0Cvector_field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x03\xE0A\x02\x125\x0A\x0Cquery_vector\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x02\x12_\x0A\x10distance_measure\x18\x03 \x01(\x0E2@.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasureB\x03\xE0A\x02\x12/\x0A\x05limit\x18\x04 \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x02\x12\"\x0A\x15distance_result_field\x18\x05 \x01(\x09B\x03\xE0A\x01\x12=\x0A\x12distance_threshold\x18\x06 \x01(\x0B2\x1C.google.protobuf.DoubleValueB\x03\xE0A\x01\"_\x0A\x0FDistanceMeasure\x12 \x0A\x1CDISTANCE_MEASURE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09EUCLIDEAN\x10\x01\x12\x0A\x0A\x06COSINE\x10\x02\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x03\"E\x0A\x09Direction\x12\x19\x0A\x15DIRECTION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"\xB8\x05\x0A\x1AStructuredAggregationQuery\x12@\x0A\x10structured_query\x18\x01 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12V\x0A\x0Caggregations\x18\x03 \x03(\x0B2;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x03\xE0A\x01\x1A\xF1\x03\x0A\x0BAggregation\x12R\x0A\x05count\x18\x01 \x01(\x0B2A.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\x0A\x03sum\x18\x02 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\x0A\x03avg\x18\x03 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x12\x0A\x05alias\x18\x07 \x01(\x09B\x03\xE0A\x01\x1A8\x0A\x05Count\x12/\x0A\x05up_to\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x1AI\x0A\x03Sum\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1AI\x0A\x03Avg\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x0A\x0A\x08operatorB\x0C\x0A\x0Aquery_type\"D\x0A\x06Cursor\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\x12\x0E\x0A\x06before\x18\x02 \x01(\x08B\xC2\x01\x0A\x17com.google.firestore.v1B\x0AQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php new file mode 100644 index 000000000000..76b015b86594 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xEA\x05\x0A'google/firestore/v1/query_profile.proto\x12\x13google.firestore.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\"&\x0A\x0EExplainOptions\x12\x14\x0A\x07analyze\x18\x01 \x01(\x08B\x03\xE0A\x01\"\x86\x01\x0A\x0EExplainMetrics\x126\x0A\x0Cplan_summary\x18\x01 \x01(\x0B2 .google.firestore.v1.PlanSummary\x12<\x0A\x0Fexecution_stats\x18\x02 \x01(\x0B2#.google.firestore.v1.ExecutionStats\"<\x0A\x0BPlanSummary\x12-\x0A\x0Cindexes_used\x18\x01 \x03(\x0B2\x17.google.protobuf.Struct\"\xA8\x01\x0A\x0EExecutionStats\x12\x18\x0A\x10results_returned\x18\x01 \x01(\x03\x125\x0A\x12execution_duration\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12\x17\x0A\x0Fread_operations\x18\x04 \x01(\x03\x12,\x0A\x0Bdebug_stats\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\xC9\x01\x0A\x17com.google.firestore.v1B\x11QueryProfileProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php new file mode 100644 index 000000000000..d8c00fd19204 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xE8\x0E\x0A\x1Fgoogle/firestore/v1/write.proto\x12\x13google.firestore.v1\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x05Write\x12/\x0A\x06update\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x10\x0A\x06delete\x18\x02 \x01(\x09H\x00\x12;\x0A\x09transform\x18\x06 \x01(\x0B2&.google.firestore.v1.DocumentTransformH\x00\x126\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12P\x0A\x11update_transforms\x18\x07 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.PreconditionB\x0B\x0A\x09operation\"\xE5\x04\x0A\x11DocumentTransform\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12O\x0A\x10field_transforms\x18\x02 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x1A\xEC\x03\x0A\x0EFieldTransform\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12`\x0A\x13set_to_server_value\x18\x02 \x01(\x0E2A.google.firestore.v1.DocumentTransform.FieldTransform.ServerValueH\x00\x12/\x0A\x09increment\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07maximum\x18\x04 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07minimum\x18\x05 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12B\x0A\x17append_missing_elements\x18\x06 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x12@\x0A\x15remove_all_from_array\x18\x07 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\"=\x0A\x0BServerValue\x12\x1C\x0A\x18SERVER_VALUE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CREQUEST_TIME\x10\x01B\x10\x0A\x0Etransform_type\"u\x0A\x0BWriteResult\x12/\x0A\x0Bupdate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x11transform_results\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Value\"q\x0A\x0EDocumentChange\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12\x12\x0A\x0Atarget_ids\x18\x05 \x03(\x05\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\"m\x0A\x0EDocumentDelete\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"m\x0A\x0EDocumentRemove\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x02 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"n\x0A\x0FExistenceFilter\x12\x11\x0A\x09target_id\x18\x01 \x01(\x05\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x129\x0A\x0Funchanged_names\x18\x03 \x01(\x0B2 .google.firestore.v1.BloomFilterB\xC2\x01\x0A\x17com.google.firestore.v1B\x0AWriteProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php new file mode 100644 index 000000000000..f7296b1c7d2e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php @@ -0,0 +1,86 @@ +google.firestore.v1.AggregationResult + */ +class AggregationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + */ + private $aggregate_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); + parent::__construct($data); + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAggregateFields() + { + return $this->aggregate_fields; + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAggregateFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->aggregate_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php new file mode 100644 index 000000000000..8d770c6e90db --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php @@ -0,0 +1,67 @@ +google.firestore.v1.ArrayValue + */ +class ArrayValue extends \Google\Protobuf\Internal\Message +{ + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Value[] $values + * Values in the array. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getValues() + { + return $this->values; + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php new file mode 100644 index 000000000000..0b845bb3b850 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php @@ -0,0 +1,296 @@ +google.firestore.v1.BatchGetDocumentsRequest + */ +class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param string[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php new file mode 100644 index 000000000000..15ebf121f41b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php @@ -0,0 +1,214 @@ +google.firestore.v1.BatchGetDocumentsResponse + */ +class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $found + * A document that was requested. + * @type string $missing + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type string $transaction + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @return string + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @param string $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php new file mode 100644 index 000000000000..1e475fa0e39f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php @@ -0,0 +1,152 @@ +google.firestore.v1.BatchWriteRequest + */ +class BatchWriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this batch write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php new file mode 100644 index 000000000000..b2da372d7a45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php @@ -0,0 +1,118 @@ +google.firestore.v1.BatchWriteResponse + */ +class BatchWriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + */ + private $status; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Rpc\Status[] $status + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @return RepeatedField<\Google\Rpc\Status> + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @param \Google\Rpc\Status[] $var + * @return $this + */ + public function setStatus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->status = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php new file mode 100644 index 000000000000..ff5dc33718d1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php @@ -0,0 +1,134 @@ +google.firestore.v1.BeginTransactionRequest + */ +class BeginTransactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + */ + protected $options = null; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * @return \Google\Cloud\Firestore\V1\BeginTransactionRequest + * + * @experimental + */ + public static function build(string $database): self + { + return (new self()) + ->setDatabase($database); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $options + * The options for the transaction. + * Defaults to a read-write transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php new file mode 100644 index 000000000000..f790bd672f01 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php @@ -0,0 +1,68 @@ +google.firestore.v1.BeginTransactionResponse + */ +class BeginTransactionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + */ + protected $transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php new file mode 100644 index 000000000000..296bfb4a577f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php @@ -0,0 +1,124 @@ +google.firestore.v1.BitSequence + */ +class BitSequence extends \Google\Protobuf\Internal\Message +{ + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + */ + protected $bitmap = ''; + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + */ + protected $padding = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bitmap + * The bytes that encode the bit sequence. + * May have a length of zero. + * @type int $padding + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); + parent::__construct($data); + } + + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + * @return string + */ + public function getBitmap() + { + return $this->bitmap; + } + + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + * @param string $var + * @return $this + */ + public function setBitmap($var) + { + GPBUtil::checkString($var, False); + $this->bitmap = $var; + + return $this; + } + + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + * @return int + */ + public function getPadding() + { + return $this->padding; + } + + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + * @param int $var + * @return $this + */ + public function setPadding($var) + { + GPBUtil::checkInt32($var); + $this->padding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php new file mode 100644 index 000000000000..2760f1c7e40a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php @@ -0,0 +1,119 @@ +google.firestore.v1.BloomFilter + */ +class BloomFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + */ + protected $bits = null; + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + */ + protected $hash_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\BitSequence $bits + * The bloom filter data. + * @type int $hash_count + * The number of hashes used by the algorithm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); + parent::__construct($data); + } + + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + * @return \Google\Cloud\Firestore\V1\BitSequence|null + */ + public function getBits() + { + return $this->bits; + } + + public function hasBits() + { + return isset($this->bits); + } + + public function clearBits() + { + unset($this->bits); + } + + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + * @param \Google\Cloud\Firestore\V1\BitSequence $var + * @return $this + */ + public function setBits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BitSequence::class); + $this->bits = $var; + + return $this; + } + + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + * @return int + */ + public function getHashCount() + { + return $this->hash_count; + } + + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + * @param int $var + * @return $this + */ + public function setHashCount($var) + { + GPBUtil::checkInt32($var); + $this->hash_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php new file mode 100644 index 000000000000..28a7f5186283 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php @@ -0,0 +1,161 @@ +google.firestore.v1.CommitRequest + */ +class CommitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param \Google\Cloud\Firestore\V1\Write[] $writes The writes to apply. + * + * Always executed atomically and in order. + * + * @return \Google\Cloud\Firestore\V1\CommitRequest + * + * @experimental + */ + public static function build(string $database, array $writes): self + { + return (new self()) + ->setDatabase($database) + ->setWrites($writes); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Always executed atomically and in order. + * @type string $transaction + * If set, applies all writes in this transaction, and commits it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php new file mode 100644 index 000000000000..9132548afe22 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php @@ -0,0 +1,123 @@ +google.firestore.v1.CommitResponse + */ +class CommitResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php new file mode 100644 index 000000000000..7f77953b9837 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php @@ -0,0 +1,248 @@ +google.firestore.v1.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + */ + protected $document_id = ''; + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + */ + protected $mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * @type string $collection_id + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * @type string $document_id + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The document to create. `name` must not be set. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @return string + */ + public function getDocumentId() + { + return $this->document_id; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @param string $var + * @return $this + */ + public function setDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->document_id = $var; + + return $this; + } + + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\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 create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php new file mode 100644 index 000000000000..fdf744e2c0e3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php @@ -0,0 +1,113 @@ +google.firestore.v1.Cursor + */ +class Cursor extends \Google\Protobuf\Internal\Message +{ + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + */ + protected $before = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Value[] $values + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * @type bool $before + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getValues() + { + return $this->values; + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @return bool + */ + public function getBefore() + { + return $this->before; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @param bool $var + * @return $this + */ + public function setBefore($var) + { + GPBUtil::checkBool($var); + $this->before = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php new file mode 100644 index 000000000000..a77ac38f9721 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php @@ -0,0 +1,134 @@ +google.firestore.v1.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + */ + protected $current_document = null; + + /** + * @param string $name Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * @return \Google\Cloud\Firestore\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. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php new file mode 100644 index 000000000000..f858f1fe4e34 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php @@ -0,0 +1,290 @@ +google.firestore.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + */ + private $fields; + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type array|\Google\Protobuf\Internal\MapField $fields + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php new file mode 100644 index 000000000000..4d89e75f035e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php @@ -0,0 +1,154 @@ +google.firestore.v1.DocumentChange + */ +class DocumentChange extends \Google\Protobuf\Internal\Message +{ + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + */ + private $target_ids; + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * @type int[] $target_ids + * A set of target IDs of targets that match this document. + * @type int[] $removed_target_ids + * A set of target IDs for targets that no longer match this document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @return RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @param int[] $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php new file mode 100644 index 000000000000..706a0f731675 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php @@ -0,0 +1,158 @@ +google.firestore.v1.DocumentDelete + */ +class DocumentDelete extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * @type int[] $removed_target_ids + * A set of target IDs for targets that previously matched this entity. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php new file mode 100644 index 000000000000..9f4e56639765 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php @@ -0,0 +1,80 @@ +google.firestore.v1.DocumentMask + */ +class DocumentMask extends \Google\Protobuf\Internal\Message +{ + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + */ + private $field_paths; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $field_paths + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @return RepeatedField + */ + public function getFieldPaths() + { + return $this->field_paths; + } + + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @param string[] $var + * @return $this + */ + public function setFieldPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_paths = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php new file mode 100644 index 000000000000..e346028118e7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php @@ -0,0 +1,160 @@ +google.firestore.v1.DocumentRemove + */ +class DocumentRemove extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + */ + private $removed_target_ids; + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * @type int[] $removed_target_ids + * A set of target IDs for targets that previously matched this document. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php new file mode 100644 index 000000000000..d57bdf03c859 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php @@ -0,0 +1,109 @@ +google.firestore.v1.DocumentTransform + */ +class DocumentTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + */ + private $field_transforms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The name of the document to transform. + * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $field_transforms + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> + */ + public function getFieldTransforms() + { + return $this->field_transforms; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var + * @return $this + */ + public function setFieldTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->field_transforms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php new file mode 100644 index 000000000000..10135fb11738 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php @@ -0,0 +1,414 @@ +google.firestore.v1.DocumentTransform.FieldTransform + */ +class FieldTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $transform_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * @type int $set_to_server_value + * Sets the field to the given server value. + * @type \Google\Cloud\Firestore\V1\Value $increment + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * @type \Google\Cloud\Firestore\V1\Value $maximum + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\Value $minimum + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @return int + */ + public function getSetToServerValue() + { + return $this->readOneof(2); + } + + public function hasSetToServerValue() + { + return $this->hasOneof(2); + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @param int $var + * @return $this + */ + public function setSetToServerValue($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getIncrement() + { + return $this->readOneof(3); + } + + public function hasIncrement() + { + return $this->hasOneof(3); + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setIncrement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMaximum() + { + return $this->readOneof(4); + } + + public function hasMaximum() + { + return $this->hasOneof(4); + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMaximum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMinimum() + { + return $this->readOneof(5); + } + + public function hasMinimum() + { + return $this->hasOneof(5); + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMinimum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getAppendMissingElements() + { + return $this->readOneof(6); + } + + public function hasAppendMissingElements() + { + return $this->hasOneof(6); + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setAppendMissingElements($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getRemoveAllFromArray() + { + return $this->readOneof(7); + } + + public function hasRemoveAllFromArray() + { + return $this->hasOneof(7); + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setRemoveAllFromArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getTransformType() + { + return $this->whichOneof("transform_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php new file mode 100644 index 000000000000..32444539ac62 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php @@ -0,0 +1,56 @@ +google.firestore.v1.DocumentTransform.FieldTransform.ServerValue + */ +class ServerValue +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; + */ + const SERVER_VALUE_UNSPECIFIED = 0; + /** + * The time at which the server processed the request, with millisecond + * precision. If used on multiple fields (same or different documents) in + * a transaction, all the fields will get the same server timestamp. + * + * Generated from protobuf enum REQUEST_TIME = 1; + */ + const REQUEST_TIME = 1; + + private static $valueToName = [ + self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', + self::REQUEST_TIME => 'REQUEST_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php new file mode 100644 index 000000000000..10221d2cba4b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php @@ -0,0 +1,240 @@ +google.firestore.v1.ExecutePipelineRequest + */ +class ExecutePipelineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + protected $pipeline_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * @type \Google\Cloud\Firestore\V1\StructuredPipeline $structured_pipeline + * A pipelined operation. + * @type string $transaction + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * A pipelined operation. + * + * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * @return \Google\Cloud\Firestore\V1\StructuredPipeline|null + */ + public function getStructuredPipeline() + { + return $this->readOneof(2); + } + + public function hasStructuredPipeline() + { + return $this->hasOneof(2); + } + + /** + * A pipelined operation. + * + * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * @param \Google\Cloud\Firestore\V1\StructuredPipeline $var + * @return $this + */ + public function setStructuredPipeline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredPipeline::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(5); + } + + public function hasTransaction() + { + return $this->hasOneof(5); + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(6); + } + + public function hasNewTransaction() + { + return $this->hasOneof(6); + } + + /** + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getPipelineType() + { + return $this->whichOneof("pipeline_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php new file mode 100644 index 000000000000..6ee7dc36a3e0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php @@ -0,0 +1,285 @@ +google.firestore.v1.ExecutePipelineResponse + */ +class ExecutePipelineResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + */ + protected $transaction = ''; + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + */ + private $results; + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + */ + protected $execution_time = null; + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + */ + protected $explain_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * @type \Google\Cloud\Firestore\V1\Document[] $results + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * @type \Google\Protobuf\Timestamp $execution_time + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * @type \Google\Cloud\Firestore\V1\ExplainStats $explain_stats + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> + */ + public function getResults() + { + return $this->results; + } + + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + * @param \Google\Cloud\Firestore\V1\Document[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); + $this->results = $arr; + + return $this; + } + + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExecutionTime() + { + return $this->execution_time; + } + + public function hasExecutionTime() + { + return isset($this->execution_time); + } + + public function clearExecutionTime() + { + unset($this->execution_time); + } + + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecutionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execution_time = $var; + + return $this; + } + + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + * @return \Google\Cloud\Firestore\V1\ExplainStats|null + */ + public function getExplainStats() + { + return $this->explain_stats; + } + + public function hasExplainStats() + { + return isset($this->explain_stats); + } + + public function clearExplainStats() + { + unset($this->explain_stats); + } + + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + * @param \Google\Cloud\Firestore\V1\ExplainStats $var + * @return $this + */ + public function setExplainStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainStats::class); + $this->explain_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php new file mode 100644 index 000000000000..63cbbcf07b0c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php @@ -0,0 +1,237 @@ +google.firestore.v1.ExecutionStats + */ +class ExecutionStats extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + */ + protected $results_returned = 0; + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + */ + protected $execution_duration = null; + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + */ + protected $read_operations = 0; + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + */ + protected $debug_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $results_returned + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * @type \Google\Protobuf\Duration $execution_duration + * Total time to execute the query in the backend. + * @type int|string $read_operations + * Total billable read operations. + * @type \Google\Protobuf\Struct $debug_stats + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + * @return int|string + */ + public function getResultsReturned() + { + return $this->results_returned; + } + + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + * @param int|string $var + * @return $this + */ + public function setResultsReturned($var) + { + GPBUtil::checkInt64($var); + $this->results_returned = $var; + + return $this; + } + + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getExecutionDuration() + { + return $this->execution_duration; + } + + public function hasExecutionDuration() + { + return isset($this->execution_duration); + } + + public function clearExecutionDuration() + { + unset($this->execution_duration); + } + + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExecutionDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->execution_duration = $var; + + return $this; + } + + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + * @return int|string + */ + public function getReadOperations() + { + return $this->read_operations; + } + + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + * @param int|string $var + * @return $this + */ + public function setReadOperations($var) + { + GPBUtil::checkInt64($var); + $this->read_operations = $var; + + return $this; + } + + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getDebugStats() + { + return $this->debug_stats; + } + + public function hasDebugStats() + { + return isset($this->debug_stats); + } + + public function clearDebugStats() + { + unset($this->debug_stats); + } + + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDebugStats($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->debug_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php new file mode 100644 index 000000000000..a136f19886db --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php @@ -0,0 +1,209 @@ +google.firestore.v1.ExistenceFilter + */ +class ExistenceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + */ + protected $target_id = 0; + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + */ + protected $count = 0; + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + protected $unchanged_names = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_id + * The target ID to which this filter applies. + * @type int $count + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * @type \Google\Cloud\Firestore\V1\BloomFilter $unchanged_names + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + * @return \Google\Cloud\Firestore\V1\BloomFilter|null + */ + public function getUnchangedNames() + { + return $this->unchanged_names; + } + + public function hasUnchangedNames() + { + return isset($this->unchanged_names); + } + + public function clearUnchangedNames() + { + unset($this->unchanged_names); + } + + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + * @param \Google\Cloud\Firestore\V1\BloomFilter $var + * @return $this + */ + public function setUnchangedNames($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BloomFilter::class); + $this->unchanged_names = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php new file mode 100644 index 000000000000..0e879bab9188 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php @@ -0,0 +1,129 @@ +google.firestore.v1.ExplainMetrics + */ +class ExplainMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + */ + protected $plan_summary = null; + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + */ + protected $execution_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\PlanSummary $plan_summary + * Planning phase information for the query. + * @type \Google\Cloud\Firestore\V1\ExecutionStats $execution_stats + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + * @return \Google\Cloud\Firestore\V1\PlanSummary|null + */ + public function getPlanSummary() + { + return $this->plan_summary; + } + + public function hasPlanSummary() + { + return isset($this->plan_summary); + } + + public function clearPlanSummary() + { + unset($this->plan_summary); + } + + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + * @param \Google\Cloud\Firestore\V1\PlanSummary $var + * @return $this + */ + public function setPlanSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PlanSummary::class); + $this->plan_summary = $var; + + return $this; + } + + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + * @return \Google\Cloud\Firestore\V1\ExecutionStats|null + */ + public function getExecutionStats() + { + return $this->execution_stats; + } + + public function hasExecutionStats() + { + return isset($this->execution_stats); + } + + public function clearExecutionStats() + { + unset($this->execution_stats); + } + + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + * @param \Google\Cloud\Firestore\V1\ExecutionStats $var + * @return $this + */ + public function setExecutionStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExecutionStats::class); + $this->execution_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php new file mode 100644 index 000000000000..05b64823f7d4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php @@ -0,0 +1,83 @@ +google.firestore.v1.ExplainOptions + */ +class ExplainOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $analyze = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $analyze + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAnalyze() + { + return $this->analyze; + } + + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAnalyze($var) + { + GPBUtil::checkBool($var); + $this->analyze = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php new file mode 100644 index 000000000000..ca8d929ebf74 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php @@ -0,0 +1,87 @@ +google.firestore.v1.ExplainStats + */ +class ExplainStats extends \Google\Protobuf\Internal\Message +{ + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + */ + protected $data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Any $data + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\ExplainStats::initOnce(); + parent::__construct($data); + } + + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + * @return \Google\Protobuf\Any|null + */ + public function getData() + { + return $this->data; + } + + public function hasData() + { + return isset($this->data); + } + + public function clearData() + { + unset($this->data); + } + + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php new file mode 100644 index 000000000000..4e4caa99345d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php @@ -0,0 +1,208 @@ +google.firestore.v1.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads the document in a transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(3); + } + + public function hasTransaction() + { + return $this->hasOneof(3); + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(5); + } + + public function hasReadTime() + { + return $this->hasOneof(5); + } + + /** + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php new file mode 100644 index 000000000000..5ff67a8a156a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php @@ -0,0 +1,219 @@ +google.firestore.v1.ListCollectionIdsRequest + */ +class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + protected $consistency_selector; + + /** + * @param string $parent Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * @return \Google\Cloud\Firestore\V1\ListCollectionIdsRequest + * + * @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 document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type int $page_size + * The maximum number of results to return. + * @type string $page_token + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return. + * + * 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. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * 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; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(4); + } + + public function hasReadTime() + { + return $this->hasOneof(4); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php new file mode 100644 index 000000000000..9607c86c708c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php @@ -0,0 +1,102 @@ +google.firestore.v1.ListCollectionIdsResponse + */ +class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + */ + private $collection_ids; + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $collection_ids + * The collection ids. + * @type string $next_page_token + * A page token that may be used to continue the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php new file mode 100644 index 000000000000..95df1ff70628 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php @@ -0,0 +1,462 @@ +google.firestore.v1.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $collection_id = ''; + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mask = null; + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + */ + protected $show_missing = false; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type string $collection_id + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * @type int $page_size + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * @type string $page_token + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * @type string $order_by + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Perform the read as part of an already active transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type bool $show_missing + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Perform the read as part of an already active transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(8); + } + + public function hasTransaction() + { + return $this->hasOneof(8); + } + + /** + * Perform the read as part of an already active transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(10); + } + + public function hasReadTime() + { + return $this->hasOneof(10); + } + + /** + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @return bool + */ + public function getShowMissing() + { + return $this->show_missing; + } + + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @param bool $var + * @return $this + */ + public function setShowMissing($var) + { + GPBUtil::checkBool($var); + $this->show_missing = $var; + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php new file mode 100644 index 000000000000..cc7b6cc12bf7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php @@ -0,0 +1,106 @@ +google.firestore.v1.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + */ + private $documents; + /** + * A token to retrieve the next page of documents. + * 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 \Google\Cloud\Firestore\V1\Document[] $documents + * The Documents found. + * @type string $next_page_token + * A token to retrieve the next page of documents. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @param \Google\Cloud\Firestore\V1\Document[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of documents. + * 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 to retrieve the next page of documents. + * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php new file mode 100644 index 000000000000..806288a8cb01 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php @@ -0,0 +1,180 @@ +google.firestore.v1.ListenRequest + */ +class ListenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + protected $target_change; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Target $add_target + * A target to add to this stream. + * @type int $remove_target + * The ID of a target to remove from this stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this target change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @return \Google\Cloud\Firestore\V1\Target|null + */ + public function getAddTarget() + { + return $this->readOneof(2); + } + + public function hasAddTarget() + { + return $this->hasOneof(2); + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @param \Google\Cloud\Firestore\V1\Target $var + * @return $this + */ + public function setAddTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @return int + */ + public function getRemoveTarget() + { + return $this->readOneof(3); + } + + public function hasRemoveTarget() + { + return $this->hasOneof(3); + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @param int $var + * @return $this + */ + public function setRemoveTarget($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetChange() + { + return $this->whichOneof("target_change"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php new file mode 100644 index 000000000000..1848b4a3012f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php @@ -0,0 +1,219 @@ +google.firestore.v1.ListenResponse + */ +class ListenResponse extends \Google\Protobuf\Internal\Message +{ + protected $response_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TargetChange $target_change + * Targets have changed. + * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change + * A [Document][google.firestore.v1.Document] has changed. + * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete + * A [Document][google.firestore.v1.Document] has been deleted. + * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @return \Google\Cloud\Firestore\V1\TargetChange|null + */ + public function getTargetChange() + { + return $this->readOneof(2); + } + + public function hasTargetChange() + { + return $this->hasOneof(2); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @param \Google\Cloud\Firestore\V1\TargetChange $var + * @return $this + */ + public function setTargetChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @return \Google\Cloud\Firestore\V1\DocumentChange|null + */ + public function getDocumentChange() + { + return $this->readOneof(3); + } + + public function hasDocumentChange() + { + return $this->hasOneof(3); + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @param \Google\Cloud\Firestore\V1\DocumentChange $var + * @return $this + */ + public function setDocumentChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @return \Google\Cloud\Firestore\V1\DocumentDelete|null + */ + public function getDocumentDelete() + { + return $this->readOneof(4); + } + + public function hasDocumentDelete() + { + return $this->hasOneof(4); + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @param \Google\Cloud\Firestore\V1\DocumentDelete $var + * @return $this + */ + public function setDocumentDelete($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @return \Google\Cloud\Firestore\V1\DocumentRemove|null + */ + public function getDocumentRemove() + { + return $this->readOneof(6); + } + + public function hasDocumentRemove() + { + return $this->hasOneof(6); + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @param \Google\Cloud\Firestore\V1\DocumentRemove $var + * @return $this + */ + public function setDocumentRemove($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null + */ + public function getFilter() + { + return $this->readOneof(5); + } + + public function hasFilter() + { + return $this->hasOneof(5); + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponseType() + { + return $this->whichOneof("response_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php new file mode 100644 index 000000000000..23d448dfcd95 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php @@ -0,0 +1,83 @@ +google.firestore.v1.MapValue + */ +class MapValue extends \Google\Protobuf\Internal\Message +{ + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $fields + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php new file mode 100644 index 000000000000..c43b051420c3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php @@ -0,0 +1,149 @@ +google.firestore.v1.Function + */ +class PBFunction extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * @type \Google\Cloud\Firestore\V1\Value[] $args + * Optional. Ordered list of arguments the given function expects. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional named arguments that certain functions may support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->args = $arr; + + return $this; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php new file mode 100644 index 000000000000..8ef18f40550b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php @@ -0,0 +1,364 @@ +google.firestore.v1.PartitionQueryRequest + */ +class PartitionQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + */ + protected $partition_count = 0; + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * @type int|string $partition_count + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * @type string $page_token + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * @type int $page_size + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @return int|string + */ + public function getPartitionCount() + { + return $this->partition_count; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @param int|string $var + * @return $this + */ + public function setPartitionCount($var) + { + GPBUtil::checkInt64($var); + $this->partition_count = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php new file mode 100644 index 000000000000..4592a55de307 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php @@ -0,0 +1,162 @@ +google.firestore.v1.PartitionQueryResponse + */ +class PartitionQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + */ + private $partitions; + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * 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 \Google\Cloud\Firestore\V1\Cursor[] $partitions + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * @type string $next_page_token + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Cursor> + */ + public function getPartitions() + { + return $this->partitions; + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @param \Google\Cloud\Firestore\V1\Cursor[] $var + * @return $this + */ + public function setPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); + $this->partitions = $arr; + + return $this; + } + + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php new file mode 100644 index 000000000000..8d5c8afc6abc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php @@ -0,0 +1,67 @@ +google.firestore.v1.Pipeline + */ +class Pipeline extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $stages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Pipeline\Stage[] $stages + * Required. Ordered list of stages to evaluate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Pipeline\Stage> + */ + public function getStages() + { + return $this->stages; + } + + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Pipeline\Stage[] $var + * @return $this + */ + public function setStages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Pipeline\Stage::class); + $this->stages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php new file mode 100644 index 000000000000..47a7f1e726f9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php @@ -0,0 +1,157 @@ +google.firestore.v1.Pipeline.Stage + */ +class Stage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * @type \Google\Cloud\Firestore\V1\Value[] $args + * Optional. Ordered list of arguments the given stage expects. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional named arguments that certain functions may support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->args = $arr; + + return $this; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php new file mode 100644 index 000000000000..517cd29d648f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php @@ -0,0 +1,83 @@ +google.firestore.v1.PlanSummary + */ +class PlanSummary extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + */ + private $indexes_used; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct[] $indexes_used + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + * @return RepeatedField<\Google\Protobuf\Struct> + */ + public function getIndexesUsed() + { + return $this->indexes_used; + } + + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + * @param \Google\Protobuf\Struct[] $var + * @return $this + */ + public function setIndexesUsed($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); + $this->indexes_used = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php new file mode 100644 index 000000000000..a78e481b7ad5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php @@ -0,0 +1,114 @@ +google.firestore.v1.Precondition + */ +class Precondition extends \Google\Protobuf\Internal\Message +{ + protected $condition_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $exists + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * @type \Google\Protobuf\Timestamp $update_time + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @return bool + */ + public function getExists() + { + return $this->readOneof(1); + } + + public function hasExists() + { + return $this->hasOneof(1); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @param bool $var + * @return $this + */ + public function setExists($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->readOneof(2); + } + + public function hasUpdateTime() + { + return $this->hasOneof(2); + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * 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->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConditionType() + { + return $this->whichOneof("condition_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php new file mode 100644 index 000000000000..ab42c1a2a4c9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php @@ -0,0 +1,121 @@ +google.firestore.v1.RollbackRequest + */ +class RollbackRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transaction = ''; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param string $transaction Required. The transaction to roll back. + * + * @return \Google\Cloud\Firestore\V1\RollbackRequest + * + * @experimental + */ + public static function build(string $database, string $transaction): self + { + return (new self()) + ->setDatabase($database) + ->setTransaction($transaction); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type string $transaction + * Required. The transaction to roll back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php new file mode 100644 index 000000000000..723a1d0962f1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php @@ -0,0 +1,304 @@ +google.firestore.v1.RunAggregationQueryRequest + */ +class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $explain_options = null; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query + * An aggregation query. + * @type string $transaction + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null + */ + public function getStructuredAggregationQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredAggregationQuery() + { + return $this->hasOneof(2); + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var + * @return $this + */ + public function setStructuredAggregationQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\ExplainOptions|null + */ + public function getExplainOptions() + { + return $this->explain_options; + } + + public function hasExplainOptions() + { + return isset($this->explain_options); + } + + public function clearExplainOptions() + { + unset($this->explain_options); + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\ExplainOptions $var + * @return $this + */ + public function setExplainOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); + $this->explain_options = $var; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php new file mode 100644 index 000000000000..ace604bf5ecf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php @@ -0,0 +1,244 @@ +google.firestore.v1.RunAggregationQueryResponse + */ +class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + */ + protected $result = null; + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + */ + protected $explain_metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\AggregationResult $result + * A single aggregation result. + * Not present when reporting partial progress. + * @type string $transaction + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @return \Google\Cloud\Firestore\V1\AggregationResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @param \Google\Cloud\Firestore\V1\AggregationResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); + $this->result = $var; + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null + */ + public function getExplainMetrics() + { + return $this->explain_metrics; + } + + public function hasExplainMetrics() + { + return isset($this->explain_metrics); + } + + public function clearExplainMetrics() + { + unset($this->explain_metrics); + } + + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var + * @return $this + */ + public function setExplainMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); + $this->explain_metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php new file mode 100644 index 000000000000..91a9b297f86a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php @@ -0,0 +1,306 @@ +google.firestore.v1.RunQueryRequest + */ +class RunQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $explain_options = null; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * @type string $transaction + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(5); + } + + public function hasTransaction() + { + return $this->hasOneof(5); + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(6); + } + + public function hasNewTransaction() + { + return $this->hasOneof(6); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\ExplainOptions|null + */ + public function getExplainOptions() + { + return $this->explain_options; + } + + public function hasExplainOptions() + { + return isset($this->explain_options); + } + + public function clearExplainOptions() + { + unset($this->explain_options); + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\ExplainOptions $var + * @return $this + */ + public function setExplainOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); + $this->explain_options = $var; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php new file mode 100644 index 000000000000..0ee820b70e32 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php @@ -0,0 +1,327 @@ +google.firestore.v1.RunQueryResponse + */ +class RunQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + */ + protected $skipped_results = 0; + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + */ + protected $explain_metrics = null; + protected $continuation_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * @type \Google\Cloud\Firestore\V1\Document $document + * A query result, not set when reporting partial progress. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * @type int $skipped_results + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * @type bool $done + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @return int + */ + public function getSkippedResults() + { + return $this->skipped_results; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @param int $var + * @return $this + */ + public function setSkippedResults($var) + { + GPBUtil::checkInt32($var); + $this->skipped_results = $var; + + return $this; + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @return bool + */ + public function getDone() + { + return $this->readOneof(6); + } + + public function hasDone() + { + return $this->hasOneof(6); + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null + */ + public function getExplainMetrics() + { + return $this->explain_metrics; + } + + public function hasExplainMetrics() + { + return isset($this->explain_metrics); + } + + public function clearExplainMetrics() + { + unset($this->explain_metrics); + } + + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var + * @return $this + */ + public function setExplainMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); + $this->explain_metrics = $var; + + return $this; + } + + /** + * @return string + */ + public function getContinuationSelector() + { + return $this->whichOneof("continuation_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php new file mode 100644 index 000000000000..38f437249c88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php @@ -0,0 +1,122 @@ +google.firestore.v1.StructuredAggregationQuery + */ +class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $aggregations; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * Nested structured query. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $aggregations + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(1); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(1); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation> + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php new file mode 100644 index 000000000000..04b2898c8e33 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php @@ -0,0 +1,287 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation + */ +class Aggregation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alias = ''; + protected $operator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count + * Count aggregator. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $sum + * Sum aggregator. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $avg + * Average aggregator. + * @type string $alias + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null + */ + public function getCount() + { + return $this->readOneof(1); + } + + public function hasCount() + { + return $this->hasOneof(1); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum|null + */ + public function getSum() + { + return $this->readOneof(2); + } + + public function hasSum() + { + return $this->hasOneof(2); + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Average aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg|null + */ + public function getAvg() + { + return $this->readOneof(3); + } + + public function hasAvg() + { + return $this->hasOneof(3); + } + + /** + * Average aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $var + * @return $this + */ + public function setAvg($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->whichOneof("operator"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php new file mode 100644 index 000000000000..7c58f19ceb45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php @@ -0,0 +1,83 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + */ +class Avg extends \Google\Protobuf\Internal\Message +{ + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to aggregate on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php new file mode 100644 index 000000000000..5202b92cc409 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php @@ -0,0 +1,166 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + */ +class Count extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $up_to = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $up_to + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getUpTo() + { + return $this->up_to; + } + + public function hasUpTo() + { + return isset($this->up_to); + } + + public function clearUpTo() + { + unset($this->up_to); + } + + /** + * Returns the unboxed value from getUpTo() + + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getUpToUnwrapped() + { + return $this->readWrapperValue("up_to"); + } + + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setUpTo($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->up_to = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setUpToUnwrapped($var) + { + $this->writeWrapperValue("up_to", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php new file mode 100644 index 000000000000..5e6f0ef1b0ce --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php @@ -0,0 +1,92 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to aggregate on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php new file mode 100644 index 000000000000..91fb0cfa1f68 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php @@ -0,0 +1,114 @@ +google.firestore.v1.StructuredPipeline + */ +class StructuredPipeline extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pipeline = null; + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline + * Required. The pipeline query to execute. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional query-level arguments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Pipeline::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Pipeline|null + */ + public function getPipeline() + { + return $this->pipeline; + } + + public function hasPipeline() + { + return isset($this->pipeline); + } + + public function clearPipeline() + { + unset($this->pipeline); + } + + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Pipeline $var + * @return $this + */ + public function setPipeline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); + $this->pipeline = $var; + + return $this; + } + + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php new file mode 100644 index 000000000000..7ec21ccd6c9d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php @@ -0,0 +1,652 @@ +google.firestore.v1.StructuredQuery + */ +class StructuredQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + */ + protected $select = null; + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + */ + private $from; + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + */ + protected $where = null; + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + */ + private $order_by; + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + */ + protected $start_at = null; + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + */ + protected $end_at = null; + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + */ + protected $offset = 0; + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + */ + protected $limit = null; + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $find_nearest = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $from + * The collections to query. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where + * The filter to apply. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $order_by + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * @type \Google\Cloud\Firestore\V1\Cursor $start_at + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type \Google\Cloud\Firestore\V1\Cursor $end_at + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type int $offset + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * @type \Google\Protobuf\Int32Value $limit + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $find_nearest + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null + */ + public function getSelect() + { + return $this->select; + } + + public function hasSelect() + { + return isset($this->select); + } + + public function clearSelect() + { + unset($this->select); + } + + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var + * @return $this + */ + public function setSelect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); + $this->select = $var; + + return $this; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector> + */ + public function getFrom() + { + return $this->from; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $var + * @return $this + */ + public function setFrom($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); + $this->from = $arr; + + return $this; + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null + */ + public function getWhere() + { + return $this->where; + } + + public function hasWhere() + { + return isset($this->where); + } + + public function clearWhere() + { + unset($this->where); + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var + * @return $this + */ + public function setWhere($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->where = $var; + + return $this; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Order> + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $var + * @return $this + */ + public function setOrderBy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); + $this->order_by = $arr; + + return $this; + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getStartAt() + { + return $this->start_at; + } + + public function hasStartAt() + { + return isset($this->start_at); + } + + public function clearStartAt() + { + unset($this->start_at); + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setStartAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->start_at = $var; + + return $this; + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getEndAt() + { + return $this->end_at; + } + + public function hasEndAt() + { + return isset($this->end_at); + } + + public function clearEndAt() + { + unset($this->end_at); + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setEndAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->end_at = $var; + + return $this; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * 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 maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getLimit() + { + return $this->limit; + } + + public function hasLimit() + { + return isset($this->limit); + } + + public function clearLimit() + { + unset($this->limit); + } + + /** + * Returns the unboxed value from getLimit() + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return int|null + */ + public function getLimitUnwrapped() + { + return $this->readWrapperValue("limit"); + } + + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param int|null $var + * @return $this + */ + public function setLimitUnwrapped($var) + { + $this->writeWrapperValue("limit", $var); + return $this;} + + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest|null + */ + public function getFindNearest() + { + return $this->find_nearest; + } + + public function hasFindNearest() + { + return isset($this->find_nearest); + } + + public function clearFindNearest() + { + unset($this->find_nearest); + } + + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $var + * @return $this + */ + public function setFindNearest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest::class); + $this->find_nearest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php new file mode 100644 index 000000000000..cf990906266f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php @@ -0,0 +1,113 @@ +google.firestore.v1.StructuredQuery.CollectionSelector + */ +class CollectionSelector extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + */ + protected $collection_id = ''; + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + */ + protected $all_descendants = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collection_id + * The collection ID. + * When set, selects only collections with this ID. + * @type bool $all_descendants + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @return bool + */ + public function getAllDescendants() + { + return $this->all_descendants; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @param bool $var + * @return $this + */ + public function setAllDescendants($var) + { + GPBUtil::checkBool($var); + $this->all_descendants = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php new file mode 100644 index 000000000000..5a006c7a4ddd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php @@ -0,0 +1,109 @@ +google.firestore.v1.StructuredQuery.CompositeFilter + */ +class CompositeFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + */ + protected $op = 0; + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The operator for combining multiple filters. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $filters + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Filter> + */ + public function getFilters() + { + return $this->filters; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->filters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php new file mode 100644 index 000000000000..ae6554be217b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php @@ -0,0 +1,65 @@ +google.firestore.v1.StructuredQuery.CompositeFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * Documents are required to satisfy all of the combined filters. + * + * Generated from protobuf enum AND = 1; + */ + const PBAND = 1; + /** + * Documents are required to satisfy at least one of the combined filters. + * + * Generated from protobuf enum OR = 2; + */ + const PBOR = 2; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::PBAND => 'AND', + self::PBOR => 'OR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php new file mode 100644 index 000000000000..0c598d813733 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php @@ -0,0 +1,61 @@ +google.firestore.v1.StructuredQuery.Direction + */ +class Direction +{ + /** + * Unspecified. + * + * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; + */ + const DIRECTION_UNSPECIFIED = 0; + /** + * Ascending. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * Descending. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php new file mode 100644 index 000000000000..07005156b426 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php @@ -0,0 +1,155 @@ +google.firestore.v1.StructuredQuery.FieldFilter + */ +class FieldFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + */ + protected $op = 0; + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to filter by. + * @type int $op + * The operator to filter by. + * @type \Google\Cloud\Firestore\V1\Value $value + * The value to compare to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php new file mode 100644 index 000000000000..23eae118d8f1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php @@ -0,0 +1,143 @@ +google.firestore.v1.StructuredQuery.FieldFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is less than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN = 1; + */ + const LESS_THAN = 1; + /** + * The given `field` is less than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; + */ + const LESS_THAN_OR_EQUAL = 2; + /** + * The given `field` is greater than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN = 3; + */ + const GREATER_THAN = 3; + /** + * The given `field` is greater than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; + */ + const GREATER_THAN_OR_EQUAL = 4; + /** + * The given `field` is equal to the given `value`. + * + * Generated from protobuf enum EQUAL = 5; + */ + const EQUAL = 5; + /** + * The given `field` is not equal to the given `value`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_EQUAL = 6; + */ + const NOT_EQUAL = 6; + /** + * The given `field` is an array that contains the given `value`. + * + * Generated from protobuf enum ARRAY_CONTAINS = 7; + */ + const ARRAY_CONTAINS = 7; + /** + * The given `field` is equal to at least one value in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue`, subject to disjunction + * limits. + * * No `NOT_IN` filters in the same query. + * + * Generated from protobuf enum IN = 8; + */ + const IN = 8; + /** + * The given `field` is an array that contains any of the values in the + * given array. + * Requires: + * * That `value` is a non-empty `ArrayValue`, subject to disjunction + * limits. + * * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. + * * No `NOT_IN` filters in the same query. + * + * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; + */ + const ARRAY_CONTAINS_ANY = 9; + /** + * The value of the `field` is not in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue` with at most 10 values. + * * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, + * `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_IN = 10; + */ + const NOT_IN = 10; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', + self::EQUAL => 'EQUAL', + self::NOT_EQUAL => 'NOT_EQUAL', + self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', + self::IN => 'IN', + self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', + self::NOT_IN => 'NOT_IN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php new file mode 100644 index 000000000000..0b53587c59b6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php @@ -0,0 +1,83 @@ +google.firestore.v1.StructuredQuery.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + */ + protected $field_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php new file mode 100644 index 000000000000..3a0beed1562c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php @@ -0,0 +1,141 @@ +google.firestore.v1.StructuredQuery.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $filter_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter + * A composite filter. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter + * A filter on a document field. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter + * A filter that takes exactly one argument. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null + */ + public function getCompositeFilter() + { + return $this->readOneof(1); + } + + public function hasCompositeFilter() + { + return $this->hasOneof(1); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var + * @return $this + */ + public function setCompositeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null + */ + public function getFieldFilter() + { + return $this->readOneof(2); + } + + public function hasFieldFilter() + { + return $this->hasOneof(2); + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var + * @return $this + */ + public function setFieldFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null + */ + public function getUnaryFilter() + { + return $this->readOneof(3); + } + + public function hasUnaryFilter() + { + return $this->hasOneof(3); + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var + * @return $this + */ + public function setUnaryFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilterType() + { + return $this->whichOneof("filter_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php new file mode 100644 index 000000000000..b9f2d3f526a9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php @@ -0,0 +1,396 @@ +google.firestore.v1.StructuredQuery.FindNearest + */ +class FindNearest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vector_field = null; + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_vector = null; + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $distance_measure = 0; + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $limit = null; + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_result_field = ''; + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_threshold = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $vector_field + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * @type \Google\Cloud\Firestore\V1\Value $query_vector + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * @type int $distance_measure + * Required. The distance measure to use, required. + * @type \Google\Protobuf\Int32Value $limit + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * @type string $distance_result_field + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * @type \Google\Protobuf\DoubleValue $distance_threshold + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getVectorField() + { + return $this->vector_field; + } + + public function hasVectorField() + { + return isset($this->vector_field); + } + + public function clearVectorField() + { + unset($this->vector_field); + } + + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setVectorField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->vector_field = $var; + + return $this; + } + + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getQueryVector() + { + return $this->query_vector; + } + + public function hasQueryVector() + { + return isset($this->query_vector); + } + + public function clearQueryVector() + { + unset($this->query_vector); + } + + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setQueryVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->query_vector = $var; + + return $this; + } + + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDistanceMeasure() + { + return $this->distance_measure; + } + + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDistanceMeasure($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest\DistanceMeasure::class); + $this->distance_measure = $var; + + return $this; + } + + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getLimit() + { + return $this->limit; + } + + public function hasLimit() + { + return isset($this->limit); + } + + public function clearLimit() + { + unset($this->limit); + } + + /** + * Returns the unboxed value from getLimit() + + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int|null + */ + public function getLimitUnwrapped() + { + return $this->readWrapperValue("limit"); + } + + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int|null $var + * @return $this + */ + public function setLimitUnwrapped($var) + { + $this->writeWrapperValue("limit", $var); + return $this;} + + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDistanceResultField() + { + return $this->distance_result_field; + } + + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDistanceResultField($var) + { + GPBUtil::checkString($var, True); + $this->distance_result_field = $var; + + return $this; + } + + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getDistanceThreshold() + { + return $this->distance_threshold; + } + + public function hasDistanceThreshold() + { + return isset($this->distance_threshold); + } + + public function clearDistanceThreshold() + { + unset($this->distance_threshold); + } + + /** + * Returns the unboxed value from getDistanceThreshold() + + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return float|null + */ + public function getDistanceThresholdUnwrapped() + { + return $this->readWrapperValue("distance_threshold"); + } + + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setDistanceThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->distance_threshold = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param float|null $var + * @return $this + */ + public function setDistanceThresholdUnwrapped($var) + { + $this->writeWrapperValue("distance_threshold", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php new file mode 100644 index 000000000000..27f0c9d19df1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php @@ -0,0 +1,80 @@ +google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure + */ +class DistanceMeasure +{ + /** + * Should not be set. + * + * Generated from protobuf enum DISTANCE_MEASURE_UNSPECIFIED = 0; + */ + const DISTANCE_MEASURE_UNSPECIFIED = 0; + /** + * Measures the EUCLIDEAN distance between the vectors. See + * [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn + * more. The resulting distance decreases the more similar two vectors + * are. + * + * Generated from protobuf enum EUCLIDEAN = 1; + */ + const EUCLIDEAN = 1; + /** + * COSINE distance compares vectors based on the angle between them, which + * allows you to measure similarity that isn't based on the vectors + * magnitude. We recommend using DOT_PRODUCT with unit normalized vectors + * instead of COSINE distance, which is mathematically equivalent with + * better performance. See [Cosine + * Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn + * more about COSINE similarity and COSINE distance. The resulting + * COSINE distance decreases the more similar two vectors are. + * + * Generated from protobuf enum COSINE = 2; + */ + const COSINE = 2; + /** + * Similar to cosine but is affected by the magnitude of the vectors. See + * [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. + * The resulting distance increases the more similar two vectors are. + * + * Generated from protobuf enum DOT_PRODUCT = 3; + */ + const DOT_PRODUCT = 3; + + private static $valueToName = [ + self::DISTANCE_MEASURE_UNSPECIFIED => 'DISTANCE_MEASURE_UNSPECIFIED', + self::EUCLIDEAN => 'EUCLIDEAN', + self::COSINE => 'COSINE', + self::DOT_PRODUCT => 'DOT_PRODUCT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php new file mode 100644 index 000000000000..398914ff2a88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php @@ -0,0 +1,111 @@ +google.firestore.v1.StructuredQuery.Order + */ +class Order extends \Google\Protobuf\Internal\Message +{ + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + protected $direction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to order by. + * @type int $direction + * The direction to order by. Defaults to `ASCENDING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @param int $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); + $this->direction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php new file mode 100644 index 000000000000..07788a015d64 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php @@ -0,0 +1,75 @@ +google.firestore.v1.StructuredQuery.Projection + */ +class Projection extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $fields + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php new file mode 100644 index 000000000000..e7cffcd5e3c6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php @@ -0,0 +1,109 @@ +google.firestore.v1.StructuredQuery.UnaryFilter + */ +class UnaryFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + protected $op = 0; + protected $operand_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The unary operator to apply. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to which to apply the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->readOneof(2); + } + + public function hasField() + { + return $this->hasOneof(2); + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperandType() + { + return $this->whichOneof("operand_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php new file mode 100644 index 000000000000..4c991e2fd636 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php @@ -0,0 +1,81 @@ +google.firestore.v1.StructuredQuery.UnaryFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is equal to `NaN`. + * + * Generated from protobuf enum IS_NAN = 2; + */ + const IS_NAN = 2; + /** + * The given `field` is equal to `NULL`. + * + * Generated from protobuf enum IS_NULL = 3; + */ + const IS_NULL = 3; + /** + * The given `field` is not equal to `NaN`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NAN = 4; + */ + const IS_NOT_NAN = 4; + /** + * The given `field` is not equal to `NULL`. + * Requires: + * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NULL = 5; + */ + const IS_NOT_NULL = 5; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::IS_NAN => 'IS_NAN', + self::IS_NULL => 'IS_NULL', + self::IS_NOT_NAN => 'IS_NOT_NAN', + self::IS_NOT_NULL => 'IS_NOT_NULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php new file mode 100644 index 000000000000..187794cd9a71 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php @@ -0,0 +1,407 @@ +google.firestore.v1.Target + */ +class Target extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + */ + protected $target_id = 0; + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + */ + protected $once = false; + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + */ + protected $expected_count = null; + protected $target_type; + protected $resume_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query + * A target specified by a query. + * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents + * A target specified by a set of document names. + * @type string $resume_token + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * @type \Google\Protobuf\Timestamp $read_time + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * @type int $target_id + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * @type bool $once + * If the target should be removed once it is current and consistent. + * @type \Google\Protobuf\Int32Value $expected_count + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null + */ + public function getQuery() + { + return $this->readOneof(2); + } + + public function hasQuery() + { + return $this->hasOneof(2); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null + */ + public function getDocuments() + { + return $this->readOneof(3); + } + + public function hasDocuments() + { + return $this->hasOneof(3); + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var + * @return $this + */ + public function setDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->readOneof(4); + } + + public function hasResumeToken() + { + return $this->hasOneof(4); + } + + /** + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(11); + } + + public function hasReadTime() + { + return $this->hasOneof(11); + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @return bool + */ + public function getOnce() + { + return $this->once; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @param bool $var + * @return $this + */ + public function setOnce($var) + { + GPBUtil::checkBool($var); + $this->once = $var; + + return $this; + } + + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @return \Google\Protobuf\Int32Value|null + */ + public function getExpectedCount() + { + return $this->expected_count; + } + + public function hasExpectedCount() + { + return isset($this->expected_count); + } + + public function clearExpectedCount() + { + unset($this->expected_count); + } + + /** + * Returns the unboxed value from getExpectedCount() + + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @return int|null + */ + public function getExpectedCountUnwrapped() + { + return $this->readWrapperValue("expected_count"); + } + + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setExpectedCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->expected_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @param int|null $var + * @return $this + */ + public function setExpectedCountUnwrapped($var) + { + $this->writeWrapperValue("expected_count", $var); + return $this;} + + /** + * @return string + */ + public function getTargetType() + { + return $this->whichOneof("target_type"); + } + + /** + * @return string + */ + public function getResumeType() + { + return $this->whichOneof("resume_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php new file mode 100644 index 000000000000..b4cab2dfd941 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php @@ -0,0 +1,79 @@ +google.firestore.v1.Target.DocumentsTarget + */ +class DocumentsTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param string[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php new file mode 100644 index 000000000000..94ccd8393aa9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php @@ -0,0 +1,129 @@ +google.firestore.v1.Target.QueryTarget + */ +class QueryTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php new file mode 100644 index 000000000000..a47a27e138bd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php @@ -0,0 +1,267 @@ +google.firestore.v1.TargetChange + */ +class TargetChange extends \Google\Protobuf\Internal\Message +{ + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + */ + protected $target_change_type = 0; + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + */ + private $target_ids; + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + */ + protected $cause = null; + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + */ + protected $resume_token = ''; + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_change_type + * The type of change that occurred. + * @type int[] $target_ids + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * @type \Google\Rpc\Status $cause + * The error that resulted in this change, if applicable. + * @type string $resume_token + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * @type \Google\Protobuf\Timestamp $read_time + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @return int + */ + public function getTargetChangeType() + { + return $this->target_change_type; + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @param int $var + * @return $this + */ + public function setTargetChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); + $this->target_change_type = $var; + + return $this; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @return RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @param int[] $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @return \Google\Rpc\Status|null + */ + public function getCause() + { + return $this->cause; + } + + public function hasCause() + { + return isset($this->cause); + } + + public function clearCause() + { + unset($this->cause); + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->cause = $var; + + return $this; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->resume_token; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->resume_token = $var; + + return $this; + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php new file mode 100644 index 000000000000..0971283f5a47 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php @@ -0,0 +1,83 @@ +google.firestore.v1.TargetChange.TargetChangeType + */ +class TargetChangeType +{ + /** + * No change has occurred. Used only to send an updated `resume_token`. + * + * Generated from protobuf enum NO_CHANGE = 0; + */ + const NO_CHANGE = 0; + /** + * The targets have been added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The targets have been removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + /** + * The targets reflect all changes committed before the targets were added + * to the stream. + * This will be sent after or with a `read_time` that is greater than or + * equal to the time at which the targets were added. + * Listeners can wait for this change if read-after-write semantics + * are desired. + * + * Generated from protobuf enum CURRENT = 3; + */ + const CURRENT = 3; + /** + * The targets have been reset, and a new initial state for the targets + * will be returned in subsequent changes. + * After the initial state is complete, `CURRENT` will be returned even + * if the target was previously indicated to be `CURRENT`. + * + * Generated from protobuf enum RESET = 4; + */ + const RESET = 4; + + private static $valueToName = [ + self::NO_CHANGE => 'NO_CHANGE', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + self::CURRENT => 'CURRENT', + self::RESET => 'RESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php new file mode 100644 index 000000000000..d35fb47e9cdb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php @@ -0,0 +1,108 @@ +google.firestore.v1.TransactionOptions + */ +class TransactionOptions extends \Google\Protobuf\Internal\Message +{ + protected $mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only + * The transaction can only be used for read operations. + * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write + * The transaction can be used for both read and write operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null + */ + public function getReadOnly() + { + return $this->readOneof(2); + } + + public function hasReadOnly() + { + return $this->hasOneof(2); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var + * @return $this + */ + public function setReadOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null + */ + public function getReadWrite() + { + return $this->readOneof(3); + } + + public function hasReadWrite() + { + return $this->hasOneof(3); + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var + * @return $this + */ + public function setReadWrite($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php new file mode 100644 index 000000000000..dde09490ca47 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php @@ -0,0 +1,84 @@ +google.firestore.v1.TransactionOptions.ReadOnly + */ +class PBReadOnly extends \Google\Protobuf\Internal\Message +{ + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(2); + } + + public function hasReadTime() + { + return $this->hasOneof(2); + } + + /** + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php new file mode 100644 index 000000000000..abf223a2244e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php @@ -0,0 +1,69 @@ +google.firestore.v1.TransactionOptions.ReadWrite + */ +class ReadWrite extends \Google\Protobuf\Internal\Message +{ + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + */ + protected $retry_transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retry_transaction + * An optional transaction to retry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @return string + */ + public function getRetryTransaction() + { + return $this->retry_transaction; + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @param string $var + * @return $this + */ + public function setRetryTransaction($var) + { + GPBUtil::checkString($var, False); + $this->retry_transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php new file mode 100644 index 000000000000..96c7684e0800 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php @@ -0,0 +1,268 @@ +google.firestore.v1.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + + /** + * @param \Google\Cloud\Firestore\V1\Document $document Required. The updated document. + * Creates the document if it does not already exist. + * @param \Google\Cloud\Firestore\V1\DocumentMask $updateMask The fields to update. + * None of the field paths in the mask may contain a reserved name. + * + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * @return \Google\Cloud\Firestore\V1\UpdateDocumentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\V1\Document $document, \Google\Cloud\Firestore\V1\DocumentMask $updateMask): self + { + return (new self()) + ->setDocument($document) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The updated document. + * Creates the document if it does not already exist. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php new file mode 100644 index 000000000000..db0784d64e76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php @@ -0,0 +1,603 @@ +google.firestore.v1.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $null_value + * A null value. + * @type bool $boolean_value + * A boolean value. + * @type int|string $integer_value + * An integer value. + * @type float $double_value + * A double value. + * @type \Google\Protobuf\Timestamp $timestamp_value + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * @type string $string_value + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * @type string $bytes_value + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * @type string $reference_value + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Type\LatLng $geo_point_value + * A geo point value representing a point on the surface of Earth. + * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * @type \Google\Cloud\Firestore\V1\MapValue $map_value + * A map value. + * @type string $field_reference_value + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * @type string $variable_reference_value + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * @type \Google\Cloud\Firestore\V1\PBFunction $function_value + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline_value + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @return int + */ + public function getNullValue() + { + return $this->readOneof(11); + } + + public function hasNullValue() + { + return $this->hasOneof(11); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @param int $var + * @return $this + */ + public function setNullValue($var) + { + GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(1); + } + + public function hasBooleanValue() + { + return $this->hasOneof(1); + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A double value. + * + * Generated from protobuf field double double_value = 3; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(3); + } + + public function hasDoubleValue() + { + return $this->hasOneof(3); + } + + /** + * A double value. + * + * Generated from protobuf field double double_value = 3; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampValue() + { + return $this->readOneof(10); + } + + public function hasTimestampValue() + { + return $this->hasOneof(10); + } + + /** + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(17); + } + + public function hasStringValue() + { + return $this->hasOneof(17); + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(18); + } + + public function hasBytesValue() + { + return $this->hasOneof(18); + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @return string + */ + public function getReferenceValue() + { + return $this->readOneof(5); + } + + public function hasReferenceValue() + { + return $this->hasOneof(5); + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @param string $var + * @return $this + */ + public function setReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @return \Google\Type\LatLng|null + */ + public function getGeoPointValue() + { + return $this->readOneof(8); + } + + public function hasGeoPointValue() + { + return $this->hasOneof(8); + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setGeoPointValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getArrayValue() + { + return $this->readOneof(9); + } + + public function hasArrayValue() + { + return $this->hasOneof(9); + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setArrayValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @return \Google\Cloud\Firestore\V1\MapValue|null + */ + public function getMapValue() + { + return $this->readOneof(6); + } + + public function hasMapValue() + { + return $this->hasOneof(6); + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @param \Google\Cloud\Firestore\V1\MapValue $var + * @return $this + */ + public function setMapValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field string field_reference_value = 19; + * @return string + */ + public function getFieldReferenceValue() + { + return $this->readOneof(19); + } + + public function hasFieldReferenceValue() + { + return $this->hasOneof(19); + } + + /** + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field string field_reference_value = 19; + * @param string $var + * @return $this + */ + public function setFieldReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * + * Generated from protobuf field string variable_reference_value = 22; + * @return string + */ + public function getVariableReferenceValue() + { + return $this->readOneof(22); + } + + public function hasVariableReferenceValue() + { + return $this->hasOneof(22); + } + + /** + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * + * Generated from protobuf field string variable_reference_value = 22; + * @param string $var + * @return $this + */ + public function setVariableReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Function function_value = 20; + * @return \Google\Cloud\Firestore\V1\PBFunction|null + */ + public function getFunctionValue() + { + return $this->readOneof(20); + } + + public function hasFunctionValue() + { + return $this->hasOneof(20); + } + + /** + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Function function_value = 20; + * @param \Google\Cloud\Firestore\V1\PBFunction $var + * @return $this + */ + public function setFunctionValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PBFunction::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; + * @return \Google\Cloud\Firestore\V1\Pipeline|null + */ + public function getPipelineValue() + { + return $this->readOneof(21); + } + + public function hasPipelineValue() + { + return $this->hasOneof(21); + } + + /** + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; + * @param \Google\Cloud\Firestore\V1\Pipeline $var + * @return $this + */ + public function setPipelineValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueType() + { + return $this->whichOneof("value_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php new file mode 100644 index 000000000000..ed59c89434d1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php @@ -0,0 +1,314 @@ +google.firestore.v1.Write + */ +class Write extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + */ + protected $update_mask = null; + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + */ + private $update_transforms; + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $update + * A document to write. + * @type string $delete + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform + * Applies a transformation to a document. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $update_transforms + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getUpdate() + { + return $this->readOneof(1); + } + + public function hasUpdate() + { + return $this->hasOneof(1); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @return string + */ + public function getDelete() + { + return $this->readOneof(2); + } + + public function hasDelete() + { + return $this->hasOneof(2); + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @param string $var + * @return $this + */ + public function setDelete($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @return \Google\Cloud\Firestore\V1\DocumentTransform|null + */ + public function getTransform() + { + return $this->readOneof(6); + } + + public function hasTransform() + { + return $this->hasOneof(6); + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @param \Google\Cloud\Firestore\V1\DocumentTransform $var + * @return $this + */ + public function setTransform($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> + */ + public function getUpdateTransforms() + { + return $this->update_transforms; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var + * @return $this + */ + public function setUpdateTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->update_transforms = $arr; + + return $this; + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php new file mode 100644 index 000000000000..cd8eef8c5f35 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php @@ -0,0 +1,277 @@ +google.firestore.v1.WriteRequest + */ +class WriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + */ + protected $stream_id = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + */ + private $writes; + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + */ + protected $stream_token = ''; + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * @type string $stream_id + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * @type string $stream_token + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this write request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php new file mode 100644 index 000000000000..7413907f1e2b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php @@ -0,0 +1,203 @@ +google.firestore.v1.WriteResponse + */ +class WriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + */ + protected $stream_id = ''; + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + */ + protected $stream_token = ''; + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream_id + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * @type string $stream_token + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php new file mode 100644 index 000000000000..3684d662245a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php @@ -0,0 +1,131 @@ +google.firestore.v1.WriteResult + */ +class WriteResult extends \Google\Protobuf\Internal\Message +{ + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + */ + private $transform_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * @type \Google\Cloud\Firestore\V1\Value[] $transform_results + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @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); + } + + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getTransformResults() + { + return $this->transform_results; + } + + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setTransformResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->transform_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php new file mode 100644 index 000000000000..f16bc62003d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php @@ -0,0 +1,86 @@ +setDatabase($database) + ->setDocuments($documents); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->batchGetDocuments($request); + + /** @var BatchGetDocumentsResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + $documentsElement = '[DOCUMENTS]'; + + batch_get_documents_sample($database, $documentsElement); +} +// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php new file mode 100644 index 000000000000..102aa7be0006 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php @@ -0,0 +1,66 @@ +batchWrite($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php new file mode 100644 index 000000000000..2349a880038e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php @@ -0,0 +1,71 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BeginTransactionResponse $response */ + $response = $firestoreClient->beginTransaction($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 +{ + $database = '[DATABASE]'; + + begin_transaction_sample($database); +} +// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php new file mode 100644 index 000000000000..5cdc59666df0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php @@ -0,0 +1,74 @@ +setDatabase($database) + ->setWrites($writes); + + // Call the API and handle any network failures. + try { + /** @var CommitResponse $response */ + $response = $firestoreClient->commit($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 +{ + $database = '[DATABASE]'; + + commit_sample($database); +} +// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php new file mode 100644 index 000000000000..9f9f17993eba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php @@ -0,0 +1,83 @@ +setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->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 +{ + $parent = '[PARENT]'; + $collectionId = '[COLLECTION_ID]'; + $documentId = '[DOCUMENT_ID]'; + + create_document_sample($parent, $collectionId, $documentId); +} +// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php new file mode 100644 index 000000000000..4aaab650c29b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php @@ -0,0 +1,69 @@ +setName($name); + + // Call the API and handle any network failures. + try { + $firestoreClient->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 +{ + $name = '[NAME]'; + + delete_document_sample($name); +} +// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php new file mode 100644 index 000000000000..362c1d1510e0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php @@ -0,0 +1,76 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->executePipeline($request); + + /** @var ExecutePipelineResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + execute_pipeline_sample($database); +} +// [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php new file mode 100644 index 000000000000..ed51bc93ad05 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php @@ -0,0 +1,71 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->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 +{ + $name = '[NAME]'; + + get_document_sample($name); +} +// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php new file mode 100644 index 000000000000..7dc6a65473ab --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php @@ -0,0 +1,77 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreClient->listCollectionIds($request); + + /** @var string $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_collection_ids_sample($parent); +} +// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php new file mode 100644 index 000000000000..f26d245154b1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php @@ -0,0 +1,89 @@ +setParent($parent) + ->setCollectionId($collectionId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreClient->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 +{ + $parent = '[PARENT]'; + $collectionId = '[COLLECTION_ID]'; + + list_documents_sample($parent, $collectionId); +} +// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php new file mode 100644 index 000000000000..f1c21fa3a7d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php @@ -0,0 +1,78 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->listen(); + $stream->writeAll([$request,]); + + /** @var ListenResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + listen_sample($database); +} +// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php new file mode 100644 index 000000000000..e0baf617c0de --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php @@ -0,0 +1,64 @@ +partitionQuery($request); + + /** @var Cursor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php new file mode 100644 index 000000000000..2708c09c4b40 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php @@ -0,0 +1,72 @@ +setDatabase($database) + ->setTransaction($transaction); + + // Call the API and handle any network failures. + try { + $firestoreClient->rollback($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 +{ + $database = '[DATABASE]'; + $transaction = '...'; + + rollback_sample($database, $transaction); +} +// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php new file mode 100644 index 000000000000..adf0798bfd4f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php @@ -0,0 +1,92 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->runAggregationQuery($request); + + /** @var RunAggregationQueryResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + run_aggregation_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php new file mode 100644 index 000000000000..0678620382ff --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php @@ -0,0 +1,80 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->runQuery($request); + + /** @var RunQueryResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + run_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php new file mode 100644 index 000000000000..efd6e77a8341 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php @@ -0,0 +1,62 @@ +setDocument($document) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->updateDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php new file mode 100644 index 000000000000..635baa2a69d7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php @@ -0,0 +1,79 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->write(); + $stream->writeAll([$request,]); + + /** @var WriteResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + write_sample($database); +} +// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php new file mode 100644 index 000000000000..3ffd4513dbd8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php @@ -0,0 +1,662 @@ + batchWriteAsync(BatchWriteRequest $request, array $optionalArgs = []) + * @method PromiseInterface beginTransactionAsync(BeginTransactionRequest $request, array $optionalArgs = []) + * @method PromiseInterface commitAsync(CommitRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDocumentAsync(CreateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDocumentAsync(DeleteDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDocumentAsync(GetDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCollectionIdsAsync(ListCollectionIdsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDocumentsAsync(ListDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface partitionQueryAsync(PartitionQueryRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackAsync(RollbackRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDocumentAsync(UpdateDocumentRequest $request, array $optionalArgs = []) + */ +final class FirestoreClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.firestore.v1.Firestore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'firestore.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Firestore\V1\FirestoreClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FirestoreClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets multiple documents. + * + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + * + * @example samples/V1/FirestoreClient/batch_get_documents.php + * + * @param BatchGetDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchGetDocuments(BatchGetDocumentsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('BatchGetDocuments', $request, $callOptions); + } + + /** + * Applies a batch of write operations. + * + * The BatchWrite method does not apply the write operations atomically + * and can apply them out of order. Method does not allow more than one write + * per document. Each write succeeds or fails independently. See the + * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the + * success status of each write. + * + * If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * + * The async variant is {@see FirestoreClient::batchWriteAsync()} . + * + * @example samples/V1/FirestoreClient/batch_write.php + * + * @param BatchWriteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchWriteResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchWrite(BatchWriteRequest $request, array $callOptions = []): BatchWriteResponse + { + return $this->startApiCall('BatchWrite', $request, $callOptions)->wait(); + } + + /** + * Starts a new transaction. + * + * The async variant is {@see FirestoreClient::beginTransactionAsync()} . + * + * @example samples/V1/FirestoreClient/begin_transaction.php + * + * @param BeginTransactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BeginTransactionResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function beginTransaction(BeginTransactionRequest $request, array $callOptions = []): BeginTransactionResponse + { + return $this->startApiCall('BeginTransaction', $request, $callOptions)->wait(); + } + + /** + * Commits a transaction, while optionally updating documents. + * + * The async variant is {@see FirestoreClient::commitAsync()} . + * + * @example samples/V1/FirestoreClient/commit.php + * + * @param CommitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CommitResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function commit(CommitRequest $request, array $callOptions = []): CommitResponse + { + return $this->startApiCall('Commit', $request, $callOptions)->wait(); + } + + /** + * Creates a new document. + * + * The async variant is {@see FirestoreClient::createDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/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. + * + * The async variant is {@see FirestoreClient::deleteDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/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(); + } + + /** + * Executes a pipeline query. + * + * @example samples/V1/FirestoreClient/execute_pipeline.php + * + * @param ExecutePipelineRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function executePipeline(ExecutePipelineRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ExecutePipeline', $request, $callOptions); + } + + /** + * Gets a single document. + * + * The async variant is {@see FirestoreClient::getDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/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(); + } + + /** + * Lists all the collection IDs underneath a document. + * + * The async variant is {@see FirestoreClient::listCollectionIdsAsync()} . + * + * @example samples/V1/FirestoreClient/list_collection_ids.php + * + * @param ListCollectionIdsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listCollectionIds(ListCollectionIdsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCollectionIds', $request, $callOptions); + } + + /** + * Lists documents. + * + * The async variant is {@see FirestoreClient::listDocumentsAsync()} . + * + * @example samples/V1/FirestoreClient/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); + } + + /** + * Listens to changes. This method is only available via gRPC or WebChannel + * (not REST). + * + * @example samples/V1/FirestoreClient/listen.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function listen(array $callOptions = []): BidiStream + { + return $this->startApiCall('Listen', null, $callOptions); + } + + /** + * Partitions a query by returning partition cursors that can be used to run + * the query in parallel. The returned partition cursors are split points that + * can be used by RunQuery as starting/end points for the query results. + * + * The async variant is {@see FirestoreClient::partitionQueryAsync()} . + * + * @example samples/V1/FirestoreClient/partition_query.php + * + * @param PartitionQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 partitionQuery(PartitionQueryRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('PartitionQuery', $request, $callOptions); + } + + /** + * Rolls back a transaction. + * + * The async variant is {@see FirestoreClient::rollbackAsync()} . + * + * @example samples/V1/FirestoreClient/rollback.php + * + * @param RollbackRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 rollback(RollbackRequest $request, array $callOptions = []): void + { + $this->startApiCall('Rollback', $request, $callOptions)->wait(); + } + + /** + * Runs an aggregation query. + * + * Rather than producing [Document][google.firestore.v1.Document] results like + * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API + * allows running an aggregation to produce a series of + * [AggregationResult][google.firestore.v1.AggregationResult] server-side. + * + * High-Level Example: + * + * ``` + * -- Return the number of documents in table given a filter. + * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + * ``` + * + * @example samples/V1/FirestoreClient/run_aggregation_query.php + * + * @param RunAggregationQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function runAggregationQuery(RunAggregationQueryRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('RunAggregationQuery', $request, $callOptions); + } + + /** + * Runs a query. + * + * @example samples/V1/FirestoreClient/run_query.php + * + * @param RunQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function runQuery(RunQueryRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('RunQuery', $request, $callOptions); + } + + /** + * Updates or inserts a document. + * + * The async variant is {@see FirestoreClient::updateDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/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(); + } + + /** + * Streams batches of document updates and deletes, in order. This method is + * only available via gRPC or WebChannel (not REST). + * + * @example samples/V1/FirestoreClient/write.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function write(array $callOptions = []): BidiStream + { + return $this->startApiCall('Write', null, $callOptions); + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..8793f858e7f3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.firestore.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\V1", + "services": { + "Firestore": { + "clients": { + "grpc": { + "libraryClient": "FirestoreGapicClient", + "rpcs": { + "BatchGetDocuments": { + "methods": [ + "batchGetDocuments" + ] + }, + "BatchWrite": { + "methods": [ + "batchWrite" + ] + }, + "BeginTransaction": { + "methods": [ + "beginTransaction" + ] + }, + "Commit": { + "methods": [ + "commit" + ] + }, + "CreateDocument": { + "methods": [ + "createDocument" + ] + }, + "DeleteDocument": { + "methods": [ + "deleteDocument" + ] + }, + "ExecutePipeline": { + "methods": [ + "executePipeline" + ] + }, + "GetDocument": { + "methods": [ + "getDocument" + ] + }, + "ListCollectionIds": { + "methods": [ + "listCollectionIds" + ] + }, + "ListDocuments": { + "methods": [ + "listDocuments" + ] + }, + "Listen": { + "methods": [ + "listen" + ] + }, + "PartitionQuery": { + "methods": [ + "partitionQuery" + ] + }, + "Rollback": { + "methods": [ + "rollback" + ] + }, + "RunAggregationQuery": { + "methods": [ + "runAggregationQuery" + ] + }, + "RunQuery": { + "methods": [ + "runQuery" + ] + }, + "UpdateDocument": { + "methods": [ + "updateDocument" + ] + }, + "Write": { + "methods": [ + "write" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json new file mode 100644 index 000000000000..3f189e07e6a3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json @@ -0,0 +1,176 @@ +{ + "interfaces": { + "google.firestore.v1.Firestore": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_3_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [], + "retry_policy_4_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_5_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "ABORTED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_5_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchGetDocuments": { + "timeout_millis": 300000 + }, + "BatchWrite": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "BeginTransaction": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Commit": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ExecutePipeline": { + "timeout_millis": 300000 + }, + "GetDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListCollectionIds": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Listen": { + "timeout_millis": 86400000 + }, + "PartitionQuery": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "Rollback": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "RunAggregationQuery": { + "timeout_millis": 300000 + }, + "RunQuery": { + "timeout_millis": 300000 + }, + "UpdateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Write": { + "timeout_millis": 86400000 + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php new file mode 100644 index 000000000000..d1232247d0ae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php @@ -0,0 +1,295 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'BatchWrite' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BatchWriteResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'BeginTransaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BeginTransactionResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Commit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\CommitResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'CreateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + [ + 'keyName' => 'collection_id', + 'fieldAccessors' => [ + 'getCollectionId', + ], + ], + ], + ], + 'DeleteDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePipeline' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ExecutePipelineResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getDatabase', + ], + 'matchers' => [], + ], + [ + 'keyName' => 'database_id', + 'fieldAccessors' => [ + 'getDatabase', + ], + 'matchers' => [], + ], + ], + ], + 'GetDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCollectionIds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCollectionIds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListCollectionIdsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + [ + 'keyName' => 'collection_id', + 'fieldAccessors' => [ + 'getCollectionId', + ], + ], + ], + ], + 'Listen' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListenResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'PartitionQuery' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPartitions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\PartitionQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'Rollback' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'RunAggregationQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\RunAggregationQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RunQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\RunQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'document.name', + 'fieldAccessors' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + 'Write' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\WriteResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php new file mode 100644 index 000000000000..421c7325a999 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php @@ -0,0 +1,304 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BatchWrite' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BeginTransaction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'Commit' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', + 'body' => 'document', + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'document_id', + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePipeline' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:executePipeline', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCollectionIds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', + ], + ], + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PartitionQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'Rollback' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'RunAggregationQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', + 'body' => 'document', + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php new file mode 100644 index 000000000000..992ccc934a93 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php @@ -0,0 +1,1405 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreClient($options); + } + + /** @test */ + public function batchGetDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $missing = 'missing1069449574'; + $transaction2 = '17'; + $expectedResponse = new BatchGetDocumentsResponse(); + $expectedResponse->setMissing($missing); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $missing2 = 'missing21243859865'; + $transaction3 = '18'; + $expectedResponse2 = new BatchGetDocumentsResponse(); + $expectedResponse2->setMissing($missing2); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $missing3 = 'missing31243859866'; + $transaction4 = '19'; + $expectedResponse3 = new BatchGetDocumentsResponse(); + $expectedResponse3->setMissing($missing3); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $documents = []; + $request = (new BatchGetDocumentsRequest()) + ->setDatabase($database) + ->setDocuments($documents); + $serverStream = $gapicClient->batchGetDocuments($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getDocuments(); + $this->assertProtobufEquals($documents, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchGetDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $database = 'database1789464955'; + $documents = []; + $request = (new BatchGetDocumentsRequest()) + ->setDatabase($database) + ->setDocuments($documents); + $serverStream = $gapicClient->batchGetDocuments($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchWriteResponse(); + $transport->addResponse($expectedResponse); + $request = new BatchWriteRequest(); + $response = $gapicClient->batchWrite($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new BatchWriteRequest(); + try { + $gapicClient->batchWrite($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction = '-34'; + $expectedResponse = new BeginTransactionResponse(); + $expectedResponse->setTransaction($transaction); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $request = (new BeginTransactionRequest()) + ->setDatabase($database); + $response = $gapicClient->beginTransaction($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 + $database = 'database1789464955'; + $request = (new BeginTransactionRequest()) + ->setDatabase($database); + try { + $gapicClient->beginTransaction($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CommitResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $writes = []; + $request = (new CommitRequest()) + ->setDatabase($database) + ->setWrites($writes); + $response = $gapicClient->commit($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getWrites(); + $this->assertProtobufEquals($writes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 + $database = 'database1789464955'; + $writes = []; + $request = (new CommitRequest()) + ->setDatabase($database) + ->setWrites($writes); + try { + $gapicClient->commit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + $request = (new CreateDocumentRequest()) + ->setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + $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.firestore.v1.Firestore/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $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 + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + $request = (new CreateDocumentRequest()) + ->setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + 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 + $name = 'name3373707'; + $request = (new DeleteDocumentRequest()) + ->setName($name); + $gapicClient->deleteDocument($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $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 + $name = 'name3373707'; + $request = (new DeleteDocumentRequest()) + ->setName($name); + 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 executePipelineTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $expectedResponse = new ExecutePipelineResponse(); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $expectedResponse2 = new ExecutePipelineResponse(); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $expectedResponse3 = new ExecutePipelineResponse(); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = (new ExecutePipelineRequest()) + ->setDatabase($database); + $serverStream = $gapicClient->executePipeline($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ExecutePipeline', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executePipelineExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $database = 'database1789464955'; + $request = (new ExecutePipelineRequest()) + ->setDatabase($database); + $serverStream = $gapicClient->executePipeline($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetDocumentRequest()) + ->setName($name); + $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.firestore.v1.Firestore/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $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 + $name = 'name3373707'; + $request = (new GetDocumentRequest()) + ->setName($name); + 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 listCollectionIdsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $collectionIdsElement = 'collectionIdsElement1368994900'; + $collectionIds = [ + $collectionIdsElement, + ]; + $expectedResponse = new ListCollectionIdsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCollectionIds($collectionIds); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListCollectionIdsRequest()) + ->setParent($parent); + $response = $gapicClient->listCollectionIds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionIdsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 + $parent = 'parent-995424086'; + $request = (new ListCollectionIdsRequest()) + ->setParent($parent); + try { + $gapicClient->listCollectionIds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->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 + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $request = (new ListDocumentsRequest()) + ->setParent($parent) + ->setCollectionId($collectionId); + $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.firestore.v1.Firestore/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $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 + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $request = (new ListDocumentsRequest()) + ->setParent($parent) + ->setCollectionId($collectionId); + 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 listenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListenResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ListenResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ListenResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new ListenRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new ListenRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new ListenRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->listen(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->listen(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partitionQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $partitionsElement = new Cursor(); + $partitions = [ + $partitionsElement, + ]; + $expectedResponse = new PartitionQueryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPartitions($partitions); + $transport->addResponse($expectedResponse); + $request = new PartitionQueryRequest(); + $response = $gapicClient->partitionQuery($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partitionQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new PartitionQueryRequest(); + try { + $gapicClient->partitionQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $transaction = '-34'; + $request = (new RollbackRequest()) + ->setDatabase($database) + ->setTransaction($transaction); + $gapicClient->rollback($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getTransaction(); + $this->assertProtobufEquals($transaction, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 + $database = 'database1789464955'; + $transaction = '-34'; + $request = (new RollbackRequest()) + ->setDatabase($database) + ->setTransaction($transaction); + try { + $gapicClient->rollback($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $expectedResponse = new RunAggregationQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $expectedResponse2 = new RunAggregationQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $expectedResponse3 = new RunAggregationQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunAggregationQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runAggregationQuery($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunAggregationQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runAggregationQuery($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $skippedResults = 880286183; + $done = true; + $expectedResponse = new RunQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $expectedResponse->setSkippedResults($skippedResults); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $skippedResults2 = 153532454; + $done2 = false; + $expectedResponse2 = new RunQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $expectedResponse2->setSkippedResults($skippedResults2); + $expectedResponse2->setDone($done2); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $skippedResults3 = 153532453; + $done3 = true; + $expectedResponse3 = new RunQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $expectedResponse3->setSkippedResults($skippedResults3); + $expectedResponse3->setDone($done3); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runQuery($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runQuery($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $updateMask = new DocumentMask(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document) + ->setUpdateMask($updateMask); + $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.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $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(); + $updateMask = new DocumentMask(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document) + ->setUpdateMask($updateMask); + 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 writeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $streamId = 'streamId-315624902'; + $streamToken = '122'; + $expectedResponse = new WriteResponse(); + $expectedResponse->setStreamId($streamId); + $expectedResponse->setStreamToken($streamToken); + $transport->addResponse($expectedResponse); + $streamId2 = 'streamId21627150189'; + $streamToken2 = '-83'; + $expectedResponse2 = new WriteResponse(); + $expectedResponse2->setStreamId($streamId2); + $expectedResponse2->setStreamToken($streamToken2); + $transport->addResponse($expectedResponse2); + $streamId3 = 'streamId31627150190'; + $streamToken3 = '-82'; + $expectedResponse3 = new WriteResponse(); + $expectedResponse3->setStreamId($streamId3); + $expectedResponse3->setStreamToken($streamToken3); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new WriteRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new WriteRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new WriteRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->write(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->write(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchWriteResponse(); + $transport->addResponse($expectedResponse); + $request = new BatchWriteRequest(); + $response = $gapicClient->batchWriteAsync($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.firestore.v1.Firestore/BatchWrite', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} From 7b0d4493ccd413e062705306c6541e9222db24a4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 27 Mar 2026 01:08: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 --- Firestore/metadata/Admin/V1/Field.php | 3 +- Firestore/metadata/Admin/V1/Operation.php | 3 +- Firestore/src/Admin/V1/Field/TtlConfig.php | 75 +- .../FieldOperationMetadata/TtlConfigDelta.php | 48 + .../Google/Firestore/Admin/V1/Backup.php | 27 - .../Google/Firestore/Admin/V1/Database.php | 29 - .../Google/Firestore/Admin/V1/Field.php | 28 - .../Firestore/Admin/V1/FirestoreAdmin.php | 41 - .../Google/Firestore/Admin/V1/Index.php | 26 - .../Google/Firestore/Admin/V1/Location.php | 24 - .../Google/Firestore/Admin/V1/Operation.php | 29 - .../Firestore/Admin/V1/RealtimeUpdates.php | 24 - .../Google/Firestore/Admin/V1/Schedule.php | 29 - .../Google/Firestore/Admin/V1/Snapshot.php | 27 - .../Google/Firestore/Admin/V1/UserCreds.php | 27 - .../Cloud/Firestore/Admin/V1/Backup.php | 327 -- .../Cloud/Firestore/Admin/V1/Backup/State.php | 69 - .../Cloud/Firestore/Admin/V1/Backup/Stats.php | 139 - .../Firestore/Admin/V1/BackupSchedule.php | 316 -- .../Admin/V1/BulkDeleteDocumentsMetadata.php | 373 --- .../Admin/V1/BulkDeleteDocumentsRequest.php | 193 -- .../Admin/V1/BulkDeleteDocumentsResponse.php | 34 - .../Admin/V1/CloneDatabaseMetadata.php | 278 -- .../Admin/V1/CloneDatabaseRequest.php | 284 -- .../Admin/V1/CreateBackupScheduleRequest.php | 134 - .../Admin/V1/CreateDatabaseMetadata.php | 33 - .../Admin/V1/CreateDatabaseRequest.php | 196 -- .../Firestore/Admin/V1/CreateIndexRequest.php | 133 - .../Admin/V1/CreateUserCredsRequest.php | 190 -- .../Firestore/Admin/V1/DailyRecurrence.php | 34 - .../Cloud/Firestore/Admin/V1/Database.php | 1125 ------- .../V1/Database/AppEngineIntegrationMode.php | 66 - .../Admin/V1/Database/CmekConfig.php | 151 - .../Admin/V1/Database/ConcurrencyMode.php | 78 - .../Admin/V1/Database/DataAccessMode.php | 61 - .../Admin/V1/Database/DatabaseEdition.php | 62 - .../Admin/V1/Database/DatabaseType.php | 64 - .../V1/Database/DeleteProtectionState.php | 61 - .../Admin/V1/Database/EncryptionConfig.php | 144 - .../CustomerManagedEncryptionOptions.php | 96 - .../GoogleDefaultEncryptionOptions.php | 33 - .../SourceEncryptionOptions.php | 34 - .../PointInTimeRecoveryEnablement.php | 67 - .../Admin/V1/Database/SourceInfo.php | 120 - .../V1/Database/SourceInfo/BackupSource.php | 75 - .../Admin/V1/DeleteBackupRequest.php | 88 - .../Admin/V1/DeleteBackupScheduleRequest.php | 92 - .../Admin/V1/DeleteDatabaseMetadata.php | 33 - .../Admin/V1/DeleteDatabaseRequest.php | 129 - .../Firestore/Admin/V1/DeleteIndexRequest.php | 87 - .../Admin/V1/DeleteUserCredsRequest.php | 87 - .../Admin/V1/DisableUserCredsRequest.php | 87 - .../Admin/V1/EnableUserCredsRequest.php | 87 - .../Admin/V1/ExportDocumentsMetadata.php | 403 --- .../Admin/V1/ExportDocumentsRequest.php | 305 -- .../Admin/V1/ExportDocumentsResponse.php | 76 - .../Google/Cloud/Firestore/Admin/V1/Field.php | 253 -- .../Firestore/Admin/V1/Field/IndexConfig.php | 205 -- .../Firestore/Admin/V1/Field/TtlConfig.php | 140 - .../Admin/V1/Field/TtlConfig/State.php | 75 - .../Admin/V1/FieldOperationMetadata.php | 373 --- .../IndexConfigDelta.php | 111 - .../IndexConfigDelta/ChangeType.php | 61 - .../FieldOperationMetadata/TtlConfigDelta.php | 115 - .../TtlConfigDelta/ChangeType.php | 61 - .../Firestore/Admin/V1/GetBackupRequest.php | 88 - .../Admin/V1/GetBackupScheduleRequest.php | 93 - .../Firestore/Admin/V1/GetDatabaseRequest.php | 87 - .../Firestore/Admin/V1/GetFieldRequest.php | 87 - .../Firestore/Admin/V1/GetIndexRequest.php | 87 - .../Admin/V1/GetUserCredsRequest.php | 87 - .../Admin/V1/ImportDocumentsMetadata.php | 351 -- .../Admin/V1/ImportDocumentsRequest.php | 229 -- .../Google/Cloud/Firestore/Admin/V1/Index.php | 432 --- .../Firestore/Admin/V1/Index/ApiScope.php | 63 - .../Firestore/Admin/V1/Index/Density.php | 109 - .../Firestore/Admin/V1/Index/IndexField.php | 191 -- .../Admin/V1/Index/IndexField/ArrayConfig.php | 54 - .../Admin/V1/Index/IndexField/Order.php | 61 - .../V1/Index/IndexField/VectorConfig.php | 117 - .../IndexField/VectorConfig/FlatIndex.php | 34 - .../Firestore/Admin/V1/Index/QueryScope.php | 74 - .../Cloud/Firestore/Admin/V1/Index/State.php | 83 - .../Admin/V1/IndexOperationMetadata.php | 287 -- .../Admin/V1/ListBackupSchedulesRequest.php | 88 - .../Admin/V1/ListBackupSchedulesResponse.php | 68 - .../Firestore/Admin/V1/ListBackupsRequest.php | 169 - .../Admin/V1/ListBackupsResponse.php | 118 - .../Admin/V1/ListDatabasesRequest.php | 120 - .../Admin/V1/ListDatabasesResponse.php | 129 - .../Firestore/Admin/V1/ListFieldsRequest.php | 221 -- .../Firestore/Admin/V1/ListFieldsResponse.php | 106 - .../Firestore/Admin/V1/ListIndexesRequest.php | 197 -- .../Admin/V1/ListIndexesResponse.php | 106 - .../Admin/V1/ListUserCredsRequest.php | 87 - .../Admin/V1/ListUserCredsResponse.php | 68 - .../Firestore/Admin/V1/LocationMetadata.php | 34 - .../Firestore/Admin/V1/OperationState.php | 98 - .../Cloud/Firestore/Admin/V1/PitrSnapshot.php | 153 - .../Cloud/Firestore/Admin/V1/Progress.php | 103 - .../Admin/V1/RealtimeUpdatesMode.php | 62 - .../Admin/V1/ResetUserPasswordRequest.php | 87 - .../Admin/V1/RestoreDatabaseMetadata.php | 268 -- .../Admin/V1/RestoreDatabaseRequest.php | 278 -- .../Admin/V1/UpdateBackupScheduleRequest.php | 137 - .../Admin/V1/UpdateDatabaseMetadata.php | 33 - .../Admin/V1/UpdateDatabaseRequest.php | 137 - .../Firestore/Admin/V1/UpdateFieldRequest.php | 139 - .../Cloud/Firestore/Admin/V1/UserCreds.php | 281 -- .../Admin/V1/UserCreds/ResourceIdentity.php | 71 - .../Firestore/Admin/V1/UserCreds/State.php | 61 - .../Firestore/Admin/V1/WeeklyRecurrence.php | 72 - .../bulk_delete_documents.php | 91 - .../FirestoreAdminClient/clone_database.php | 125 - .../create_backup_schedule.php | 77 - .../FirestoreAdminClient/create_database.php | 96 - .../V1/FirestoreAdminClient/create_index.php | 94 - .../create_user_creds.php | 82 - .../V1/FirestoreAdminClient/delete_backup.php | 71 - .../delete_backup_schedule.php | 76 - .../FirestoreAdminClient/delete_database.php | 84 - .../V1/FirestoreAdminClient/delete_index.php | 75 - .../delete_user_creds.php | 70 - .../disable_user_creds.php | 72 - .../enable_user_creds.php | 72 - .../FirestoreAdminClient/export_documents.php | 94 - .../V1/FirestoreAdminClient/get_backup.php | 73 - .../get_backup_schedule.php | 78 - .../V1/FirestoreAdminClient/get_database.php | 72 - .../V1/FirestoreAdminClient/get_field.php | 77 - .../V1/FirestoreAdminClient/get_index.php | 77 - .../FirestoreAdminClient/get_user_creds.php | 73 - .../FirestoreAdminClient/import_documents.php | 85 - .../list_backup_schedules.php | 73 - .../V1/FirestoreAdminClient/list_backups.php | 76 - .../FirestoreAdminClient/list_databases.php | 72 - .../V1/FirestoreAdminClient/list_fields.php | 89 - .../V1/FirestoreAdminClient/list_indexes.php | 81 - .../FirestoreAdminClient/list_user_creds.php | 73 - .../reset_user_password.php | 72 - .../FirestoreAdminClient/restore_database.php | 124 - .../update_backup_schedule.php | 59 - .../FirestoreAdminClient/update_database.php | 71 - .../V1/FirestoreAdminClient/update_field.php | 122 - .../src/V1/Client/FirestoreAdminClient.php | 1473 -------- .../v1/Admin/src/V1/gapic_metadata.json | 178 - .../firestore_admin_client_config.json | 226 -- .../firestore_admin_descriptor_config.php | 523 --- .../firestore_admin_rest_client_config.php | 452 --- .../V1/Client/FirestoreAdminClientTest.php | 2977 ----------------- .../Google/Firestore/V1/AggregationResult.php | 25 - .../Google/Firestore/V1/BloomFilter.php | 24 - .../Google/Firestore/V1/Common.php | 25 - .../Google/Firestore/V1/Document.php | 28 - .../Google/Firestore/V1/ExplainStats.php | 25 - .../Google/Firestore/V1/Firestore.php | 40 - .../Google/Firestore/V1/Pipeline.php | 26 - .../GPBMetadata/Google/Firestore/V1/Query.php | 27 - .../Google/Firestore/V1/QueryProfile.php | 27 - .../GPBMetadata/Google/Firestore/V1/Write.php | 28 - .../Cloud/Firestore/V1/AggregationResult.php | 86 - .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 - .../Firestore/V1/BatchGetDocumentsRequest.php | 296 -- .../V1/BatchGetDocumentsResponse.php | 214 -- .../Cloud/Firestore/V1/BatchWriteRequest.php | 152 - .../Cloud/Firestore/V1/BatchWriteResponse.php | 118 - .../Firestore/V1/BeginTransactionRequest.php | 134 - .../Firestore/V1/BeginTransactionResponse.php | 68 - .../Google/Cloud/Firestore/V1/BitSequence.php | 124 - .../Google/Cloud/Firestore/V1/BloomFilter.php | 119 - .../Cloud/Firestore/V1/CommitRequest.php | 161 - .../Cloud/Firestore/V1/CommitResponse.php | 123 - .../Firestore/V1/CreateDocumentRequest.php | 248 -- .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 - .../Firestore/V1/DeleteDocumentRequest.php | 134 - .../Google/Cloud/Firestore/V1/Document.php | 290 -- .../Cloud/Firestore/V1/DocumentChange.php | 154 - .../Cloud/Firestore/V1/DocumentDelete.php | 158 - .../Cloud/Firestore/V1/DocumentMask.php | 80 - .../Cloud/Firestore/V1/DocumentRemove.php | 160 - .../Cloud/Firestore/V1/DocumentTransform.php | 109 - .../V1/DocumentTransform/FieldTransform.php | 414 --- .../FieldTransform/ServerValue.php | 56 - .../Firestore/V1/ExecutePipelineRequest.php | 240 -- .../Firestore/V1/ExecutePipelineResponse.php | 285 -- .../Cloud/Firestore/V1/ExecutionStats.php | 237 -- .../Cloud/Firestore/V1/ExistenceFilter.php | 209 -- .../Cloud/Firestore/V1/ExplainMetrics.php | 129 - .../Cloud/Firestore/V1/ExplainOptions.php | 83 - .../Cloud/Firestore/V1/ExplainStats.php | 87 - .../Cloud/Firestore/V1/GetDocumentRequest.php | 208 -- .../Firestore/V1/ListCollectionIdsRequest.php | 219 -- .../V1/ListCollectionIdsResponse.php | 102 - .../Firestore/V1/ListDocumentsRequest.php | 462 --- .../Firestore/V1/ListDocumentsResponse.php | 106 - .../Cloud/Firestore/V1/ListenRequest.php | 180 - .../Cloud/Firestore/V1/ListenResponse.php | 219 -- .../Google/Cloud/Firestore/V1/MapValue.php | 83 - .../Google/Cloud/Firestore/V1/PBFunction.php | 149 - .../Firestore/V1/PartitionQueryRequest.php | 364 -- .../Firestore/V1/PartitionQueryResponse.php | 162 - .../Google/Cloud/Firestore/V1/Pipeline.php | 67 - .../Cloud/Firestore/V1/Pipeline/Stage.php | 157 - .../Google/Cloud/Firestore/V1/PlanSummary.php | 83 - .../Cloud/Firestore/V1/Precondition.php | 114 - .../Cloud/Firestore/V1/RollbackRequest.php | 121 - .../V1/RunAggregationQueryRequest.php | 304 -- .../V1/RunAggregationQueryResponse.php | 244 -- .../Cloud/Firestore/V1/RunQueryRequest.php | 306 -- .../Cloud/Firestore/V1/RunQueryResponse.php | 327 -- .../V1/StructuredAggregationQuery.php | 122 - .../Aggregation.php | 287 -- .../Aggregation/Avg.php | 83 - .../Aggregation/Count.php | 166 - .../Aggregation/Sum.php | 92 - .../Cloud/Firestore/V1/StructuredPipeline.php | 114 - .../Cloud/Firestore/V1/StructuredQuery.php | 652 ---- .../V1/StructuredQuery/CollectionSelector.php | 113 - .../V1/StructuredQuery/CompositeFilter.php | 109 - .../CompositeFilter/Operator.php | 65 - .../V1/StructuredQuery/Direction.php | 61 - .../V1/StructuredQuery/FieldFilter.php | 155 - .../StructuredQuery/FieldFilter/Operator.php | 143 - .../V1/StructuredQuery/FieldReference.php | 83 - .../Firestore/V1/StructuredQuery/Filter.php | 141 - .../V1/StructuredQuery/FindNearest.php | 396 --- .../FindNearest/DistanceMeasure.php | 80 - .../Firestore/V1/StructuredQuery/Order.php | 111 - .../V1/StructuredQuery/Projection.php | 75 - .../V1/StructuredQuery/UnaryFilter.php | 109 - .../StructuredQuery/UnaryFilter/Operator.php | 81 - .../src/Google/Cloud/Firestore/V1/Target.php | 407 --- .../Firestore/V1/Target/DocumentsTarget.php | 79 - .../Cloud/Firestore/V1/Target/QueryTarget.php | 129 - .../Cloud/Firestore/V1/TargetChange.php | 267 -- .../V1/TargetChange/TargetChangeType.php | 83 - .../Cloud/Firestore/V1/TransactionOptions.php | 108 - .../V1/TransactionOptions/PBReadOnly.php | 84 - .../V1/TransactionOptions/ReadWrite.php | 69 - .../Firestore/V1/UpdateDocumentRequest.php | 268 -- .../src/Google/Cloud/Firestore/V1/Value.php | 603 ---- .../src/Google/Cloud/Firestore/V1/Write.php | 314 -- .../Cloud/Firestore/V1/WriteRequest.php | 277 -- .../Cloud/Firestore/V1/WriteResponse.php | 203 -- .../Google/Cloud/Firestore/V1/WriteResult.php | 131 - .../FirestoreClient/batch_get_documents.php | 86 - .../V1/FirestoreClient/batch_write.php | 66 - .../V1/FirestoreClient/begin_transaction.php | 71 - .../v1/samples/V1/FirestoreClient/commit.php | 74 - .../V1/FirestoreClient/create_document.php | 83 - .../V1/FirestoreClient/delete_document.php | 69 - .../V1/FirestoreClient/execute_pipeline.php | 76 - .../V1/FirestoreClient/get_document.php | 71 - .../FirestoreClient/list_collection_ids.php | 77 - .../V1/FirestoreClient/list_documents.php | 89 - .../v1/samples/V1/FirestoreClient/listen.php | 78 - .../V1/FirestoreClient/partition_query.php | 64 - .../samples/V1/FirestoreClient/rollback.php | 72 - .../FirestoreClient/run_aggregation_query.php | 92 - .../samples/V1/FirestoreClient/run_query.php | 80 - .../V1/FirestoreClient/update_document.php | 62 - .../v1/samples/V1/FirestoreClient/write.php | 79 - .../v1/src/V1/Client/FirestoreClient.php | 662 ---- .../Firestore/v1/src/V1/gapic_metadata.json | 103 - .../V1/resources/firestore_client_config.json | 176 - .../resources/firestore_descriptor_config.php | 295 -- .../firestore_rest_client_config.php | 304 -- .../Unit/V1/Client/FirestoreClientTest.php | 1405 -------- 268 files changed, 122 insertions(+), 42310 deletions(-) delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php diff --git a/Firestore/metadata/Admin/V1/Field.php b/Firestore/metadata/Admin/V1/Field.php index a663f8c6d9cd..bdfc8da72b88 100644 --- a/Firestore/metadata/Admin/V1/Field.php +++ b/Firestore/metadata/Admin/V1/Field.php @@ -17,8 +17,9 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + \GPBMetadata\Google\Protobuf\Duration::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xB0\x07\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\"\xC5\x04\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\x9D\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + "\x0A\x8B\x08\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\x1A\x1Egoogle/protobuf/duration.proto\"\x80\x05\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\xD8\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\x129\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/Firestore/metadata/Admin/V1/Operation.php b/Firestore/metadata/Admin/V1/Operation.php index 2cdcea36ae31..9c8527e9e62e 100644 --- a/Firestore/metadata/Admin/V1/Operation.php +++ b/Firestore/metadata/Admin/V1/Operation.php @@ -17,9 +17,10 @@ public static function initOnce() { \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); \GPBMetadata\Google\Firestore\Admin\V1\Snapshot::initOnce(); + \GPBMetadata\Google\Protobuf\Duration::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xD7\x1E\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\x99\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xB2\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + "\x0A\xAD\x1F\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xCF\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xE8\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\x124\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/Firestore/src/Admin/V1/Field/TtlConfig.php b/Firestore/src/Admin/V1/Field/TtlConfig.php index 6a7353dd8c2f..3fb96407126a 100644 --- a/Firestore/src/Admin/V1/Field/TtlConfig.php +++ b/Firestore/src/Admin/V1/Field/TtlConfig.php @@ -11,11 +11,12 @@ /** * The TTL (time-to-live) configuration for documents that have this `Field` * set. - * Storing a timestamp value into a TTL-enabled field will be treated as - * the document's absolute expiration time. For Enterprise edition databases, - * the timestamp value may also be stored in an array value in the - * TTL-enabled field. - * Timestamp values in the past indicate that the document is eligible for + * A timestamp stored in a TTL-enabled field will be used to determine the + * expiration time of the document. The expiration time is the sum + * of the timestamp value and the `expiration_offset`. + * For Enterprise edition databases, the timestamp value may alternatively be + * stored in an array value in the TTL-enabled field. + * An expiration time in the past indicates that the document is eligible for * immediate expiration. Using any other data type or leaving the field absent * will disable expiration for the individual document. * @@ -29,6 +30,17 @@ class TtlConfig extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $state = 0; + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $expiration_offset = null; /** * Constructor. @@ -38,6 +50,13 @@ class TtlConfig extends \Google\Protobuf\Internal\Message * * @type int $state * Output only. The state of the TTL configuration. + * @type \Google\Protobuf\Duration $expiration_offset + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. * } */ public function __construct($data = NULL) { @@ -71,5 +90,51 @@ public function setState($var) return $this; } + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + } diff --git a/Firestore/src/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/Firestore/src/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php index 7c610bfb44cb..f66e5ff0876f 100644 --- a/Firestore/src/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php +++ b/Firestore/src/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php @@ -21,6 +21,13 @@ class TtlConfigDelta extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; */ private $change_type = 0; + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + */ + private $expiration_offset = null; /** * Constructor. @@ -30,6 +37,9 @@ class TtlConfigDelta extends \Google\Protobuf\Internal\Message * * @type int $change_type * Specifies how the TTL configuration is changing. + * @type \Google\Protobuf\Duration $expiration_offset + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. * } */ public function __construct($data = NULL) { @@ -63,5 +73,43 @@ public function setChangeType($var) return $this; } + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php deleted file mode 100644 index 7863bdb50960..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC7\x07\x0A&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE0\x04\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x08database\x18\x02 \x01(\x09B)\xE0A\x03\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x07 \x01(\x09B\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x05stats\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.Backup.StatsB\x03\xE0A\x03\x12;\x0A\x05state\x18\x08 \x01(\x0E2'.google.firestore.admin.v1.Backup.StateB\x03\xE0A\x03\x1AW\x0A\x05Stats\x12\x17\x0A\x0Asize_bytes\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x1B\x0A\x0Edocument_count\x18\x02 \x01(\x03B\x03\xE0A\x03\x12\x18\x0A\x0Bindex_count\x18\x03 \x01(\x03B\x03\xE0A\x03\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x11\x0A\x0DNOT_AVAILABLE\x10\x03:^\xEAA[\x0A\x1Ffirestore.googleapis.com/Backup\x128projects/{project}/locations/{location}/backups/{backup}B\xDA\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0BBackupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php deleted file mode 100644 index 7e56dd37b714..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCF\x1D\x0A(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A0google/firestore/admin/v1/realtime_updates.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAB\x19\x0A\x08Database\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03uid\x18\x03 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x0Blocation_id\x18\x09 \x01(\x09\x12>\x0A\x04type\x18\x0A \x01(\x0E20.google.firestore.admin.v1.Database.DatabaseType\x12M\x0A\x10concurrency_mode\x18\x0F \x01(\x0E23.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\x0A\x18version_retention_period\x18\x11 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x03\x12>\x0A\x15earliest_version_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12l\x0A!point_in_time_recovery_enablement\x18\x15 \x01(\x0E2A.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12a\x0A\x1Bapp_engine_integration_mode\x18\x13 \x01(\x0E2<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\x0A\x0Akey_prefix\x18\x14 \x01(\x09B\x03\xE0A\x03\x12Z\x0A\x17delete_protection_state\x18\x16 \x01(\x0E29.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\x0A\x0Bcmek_config\x18\x17 \x01(\x0B2..google.firestore.admin.v1.Database.CmekConfigB\x03\xE0A\x01\x12\x18\x0A\x0Bprevious_id\x18\x19 \x01(\x09B\x03\xE0A\x03\x12H\x0A\x0Bsource_info\x18\x1A \x01(\x0B2..google.firestore.admin.v1.Database.SourceInfoB\x03\xE0A\x03\x12F\x0A\x04tags\x18\x1D \x03(\x0B2-.google.firestore.admin.v1.Database.TagsEntryB\x09\xE0A\x04\xE0A\x05\xE0A\x01\x12\x1B\x0A\x09free_tier\x18\x1E \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x0C\x0A\x04etag\x18c \x01(\x09\x12R\x0A\x10database_edition\x18\x1C \x01(\x0E23.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xE0A\x05\x12R\x0A\x15realtime_updates_mode\x18\x1F \x01(\x0E2..google.firestore.admin.v1.RealtimeUpdatesModeB\x03\xE0A\x05\x12[\x0A\x1Afirestore_data_access_mode\x18! \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x12d\x0A#mongodb_compatible_data_access_mode\x18\" \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x1AH\x0A\x0ACmekConfig\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1F\x0A\x12active_key_version\x18\x02 \x03(\x09B\x03\xE0A\x03\x1A\xE7\x01\x0A\x0ASourceInfo\x12M\x0A\x06backup\x18\x01 \x01(\x0B2;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\x0A\x09operation\x18\x03 \x01(\x09B'\xFAA\$\x0A\"firestore.googleapis.com/Operation\x1AD\x0A\x0CBackupSource\x124\x0A\x06backup\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/BackupB\x08\x0A\x06source\x1A\x88\x04\x0A\x10EncryptionConfig\x12x\x0A\x19google_default_encryption\x18\x01 \x01(\x0B2S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\x0A\x15use_source_encryption\x18\x02 \x01(\x0B2L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\x0A\x1Bcustomer_managed_encryption\x18\x03 \x01(\x0B2U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1A \x0A\x1EGoogleDefaultEncryptionOptions\x1A\x19\x0A\x17SourceEncryptionOptions\x1A=\x0A CustomerManagedEncryptionOptions\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x11\x0A\x0Fencryption_type\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"W\x0A\x0CDatabaseType\x12\x1D\x0A\x19DATABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10FIRESTORE_NATIVE\x10\x01\x12\x12\x0A\x0EDATASTORE_MODE\x10\x02\"w\x0A\x0FConcurrencyMode\x12 \x0A\x1CCONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AOPTIMISTIC\x10\x01\x12\x0F\x0A\x0BPESSIMISTIC\x10\x02\x12!\x0A\x1DOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9B\x01\x0A\x1DPointInTimeRecoveryEnablement\x121\x0A-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\x0A\x1EPOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\x0A\x1FPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\x0A\x18AppEngineIntegrationMode\x12+\x0A'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\"\x7F\x0A\x15DeleteProtectionState\x12'\x0A#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ADELETE_PROTECTION_DISABLED\x10\x01\x12\x1D\x0A\x19DELETE_PROTECTION_ENABLED\x10\x02\"Q\x0A\x0FDatabaseEdition\x12 \x0A\x1CDATABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\"o\x0A\x0EDataAccessMode\x12 \x0A\x1CDATA_ACCESS_MODE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18DATA_ACCESS_MODE_ENABLED\x10\x01\x12\x1D\x0A\x19DATA_ACCESS_MODE_DISABLED\x10\x02:R\xEAAO\x0A!firestore.googleapis.com/Database\x12'projects/{project}/databases/{database}R\x01\x01B\x0C\x0A\x0A_free_tierB\xC3\x02\x0A\x1Dcom.google.firestore.admin.v1B\x0DDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAd\x0A\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php deleted file mode 100644 index bdfc8da72b88..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8B\x08\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\x1A\x1Egoogle/protobuf/duration.proto\"\x80\x05\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\xD8\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\x129\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php deleted file mode 100644 index 4958902fc482..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php +++ /dev/null @@ -1,41 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB3`\x0A/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x18google/api/routing.proto\x1A&google/firestore/admin/v1/backup.proto\x1A(google/firestore/admin/v1/database.proto\x1A%google/firestore/admin/v1/field.proto\x1A%google/firestore/admin/v1/index.proto\x1A)google/firestore/admin/v1/operation.proto\x1A(google/firestore/admin/v1/schedule.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A*google/firestore/admin/v1/user_creds.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"g\x0A\x14ListDatabasesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x14\x0A\x0Cshow_deleted\x18\x04 \x01(\x08\"\xA8\x01\x0A\x15CreateDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12:\x0A\x08database\x18\x02 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12\x18\x0A\x0Bdatabase_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x18\x0A\x16CreateDatabaseMetadata\"d\x0A\x15ListDatabasesResponse\x126\x0A\x09databases\x18\x01 \x03(\x0B2#.google.firestore.admin.v1.Database\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"M\x0A\x12GetDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"\x84\x01\x0A\x15UpdateDatabaseRequest\x12:\x0A\x08database\x18\x01 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x18\x0A\x16UpdateDatabaseMetadata\"^\x0A\x15DeleteDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\"\x18\x0A\x16DeleteDatabaseMetadata\"\xAF\x01\x0A\x16CreateUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\x12=\x0A\x0Auser_creds\x18\x02 \x01(\x0B2\$.google.firestore.admin.v1.UserCredsB\x03\xE0A\x02\x12\x1A\x0A\x0Duser_creds_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"O\x0A\x13GetUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x14ListUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\"Q\x0A\x15ListUserCredsResponse\x128\x0A\x0Auser_creds\x18\x01 \x03(\x0B2\$.google.firestore.admin.v1.UserCreds\"R\x0A\x16EnableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"S\x0A\x17DisableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"T\x0A\x18ResetUserPasswordRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x16DeleteUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"\xA1\x01\x0A\x1BCreateBackupScheduleRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12G\x0A\x0Fbackup_schedule\x18\x02 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\"Y\x0A\x18GetBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x97\x01\x0A\x1BUpdateBackupScheduleRequest\x12G\x0A\x0Fbackup_schedule\x18\x01 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"W\x0A\x1AListBackupSchedulesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"b\x0A\x1BListBackupSchedulesResponse\x12C\x0A\x10backup_schedules\x18\x01 \x03(\x0B2).google.firestore.admin.v1.BackupSchedule\"\\\x0A\x1BDeleteBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x8C\x01\x0A\x12CreateIndexRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x124\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.IndexB\x03\xE0A\x02\"\x8D\x01\x0A\x12ListIndexesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"a\x0A\x13ListIndexesResponse\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"G\x0A\x0FGetIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"J\x0A\x12DeleteIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"{\x0A\x12UpdateFieldRequest\x124\x0A\x05field\x18\x01 \x01(\x0B2 .google.firestore.admin.v1.FieldB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"G\x0A\x0FGetFieldRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Field\"\x8C\x01\x0A\x11ListFieldsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"_\x0A\x12ListFieldsResponse\x120\x0A\x06fields\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Field\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCE\x01\x0A\x16ExportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x9A\x01\x0A\x16ImportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\"\x8E\x01\x0A\x1ABulkDeleteDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x1B\x0A\x0Ecollection_ids\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dnamespace_ids\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x1D\x0A\x1BBulkDeleteDocumentsResponse\"I\x0A\x10GetBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"_\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Location\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\"^\x0A\x13ListBackupsResponse\x122\x0A\x07backups\x18\x01 \x03(\x0B2!.google.firestore.admin.v1.Backup\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x13DeleteBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"\xFC\x02\x0A\x16RestoreDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x06backup\x18\x03 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12T\x0A\x11encryption_config\x18\x09 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12Q\x0A\x04tags\x18\x0A \x03(\x0B2;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x84\x03\x0A\x14CloneDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Dpitr_snapshot\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshotB\x03\xE0A\x02\x12T\x0A\x11encryption_config\x18\x04 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12O\x0A\x04tags\x18\x05 \x03(\x0B29.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x012\xFB1\x0A\x0EFirestoreAdmin\x12\xDB\x01\x0A\x0BCreateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1F\x0A\x05Index\x12\x16IndexOperationMetadata\xDAA\x0Cparent,index\x82\xD3\xE4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xBD\x01\x0A\x0BListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1A..google.firestore.admin.v1.ListIndexesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xA7\x01\x0A\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1A .google.firestore.admin.v1.Index\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA3\x01\x0A\x0BDeleteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA6\x01\x0A\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1A .google.firestore.admin.v1.Field\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xD9\x01\x0A\x0BUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1F\x0A\x05Field\x12\x16FieldOperationMetadata\xDAA\x05field\x82\xD3\xE4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05field\x12\xB9\x01\x0A\x0AListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1A-.google.firestore.admin.v1.ListFieldsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xDD\x01\x0A\x0FExportDocuments\x121.google.firestore.admin.v1.ExportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA2\x0A\x17ExportDocumentsResponse\x12\x17ExportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xDB\x01\x0A\x0FImportDocuments\x121.google.firestore.admin.v1.ImportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA0\x0A\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xF2\x01\x0A\x13BulkDeleteDocuments\x125.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA:\x0A\x1BBulkDeleteDocumentsResponse\x12\x1BBulkDeleteDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xD9\x01\x0A\x0ECreateDatabase\x120.google.firestore.admin.v1.CreateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA\"\x0A\x08Database\x12\x16CreateDatabaseMetadata\xDAA\x1Bparent,database,database_id\x82\xD3\xE4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08database\x12\x93\x01\x0A\x0BGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1A#.google.firestore.admin.v1.Database\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xA6\x01\x0A\x0DListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1A0.google.firestore.admin.v1.ListDatabasesResponse\"2\xDAA\x06parent\x82\xD3\xE4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xDB\x01\x0A\x0EUpdateDatabase\x120.google.firestore.admin.v1.UpdateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\"\x0A\x08Database\x12\x16UpdateDatabaseMetadata\xDAA\x14database,update_mask\x82\xD3\xE4\x93\x0262*/v1/{database.name=projects/*/databases/*}:\x08database\x12\xB8\x01\x0A\x0EDeleteDatabase\x120.google.firestore.admin.v1.DeleteDatabaseRequest\x1A\x1D.google.longrunning.Operation\"U\xCAA\"\x0A\x08Database\x12\x16DeleteDatabaseMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xCF\x01\x0A\x0FCreateUserCreds\x121.google.firestore.admin.v1.CreateUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"c\xDAA\x1Fparent,user_creds,user_creds_id\x82\xD3\xE4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\x0Auser_creds\x12\xA2\x01\x0A\x0CGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xB2\x01\x0A\x0DListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1A0.google.firestore.admin.v1.ListUserCredsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xB2\x01\x0A\x0FEnableUserCreds\x121.google.firestore.admin.v1.EnableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xB5\x01\x0A\x10DisableUserCreds\x122.google.firestore.admin.v1.DisableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xBD\x01\x0A\x11ResetUserPassword\x123.google.firestore.admin.v1.ResetUserPasswordRequest\x1A\$.google.firestore.admin.v1.UserCreds\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9A\x01\x0A\x0FDeleteUserCreds\x121.google.firestore.admin.v1.DeleteUserCredsRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\x0A\x09GetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1A!.google.firestore.admin.v1.Backup\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xAA\x01\x0A\x0BListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1A..google.firestore.admin.v1.ListBackupsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\x0A\x0CDeleteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xBF\x01\x0A\x0FRestoreDatabase\x121.google.firestore.admin.v1.RestoreDatabaseRequest\x1A\x1D.google.longrunning.Operation\"Z\xCAA#\x0A\x08Database\x12\x17RestoreDatabaseMetadata\x82\xD3\xE4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xE0\x01\x0A\x14CreateBackupSchedule\x126.google.firestore.admin.v1.CreateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"e\xDAA\x16parent,backup_schedule\x82\xD3\xE4\x93\x02F\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0Fbackup_schedule\x12\xB7\x01\x0A\x11GetBackupSchedule\x123.google.firestore.admin.v1.GetBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"B\xDAA\x04name\x82\xD3\xE4\x93\x025\x123/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xCA\x01\x0A\x13ListBackupSchedules\x125.google.firestore.admin.v1.ListBackupSchedulesRequest\x1A6.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xDAA\x06parent\x82\xD3\xE4\x93\x025\x123/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xF5\x01\x0A\x14UpdateBackupSchedule\x126.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"z\xDAA\x1Bbackup_schedule,update_mask\x82\xD3\xE4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0Fbackup_schedule\x12\xAA\x01\x0A\x14DeleteBackupSchedule\x126.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1A\x16.google.protobuf.Empty\"B\xDAA\x04name\x82\xD3\xE4\x93\x025*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xB7\x02\x0A\x0DCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1A\x1D.google.longrunning.Operation\"\xD5\x01\xCAA!\x0A\x08Database\x12\x15CloneDatabaseMetadata\x82\xD3\xE4\x93\x02,\"'/v1/{parent=projects/*}/databases:clone:\x01*\x8A\xD3\xE4\x93\x02y\x124\x0A\x16pitr_snapshot.database\x12\x1Aprojects/{project_id=*}/**\x12A\x0A\x16pitr_snapshot.database\x12'projects/*/databases/{database_id=*}/**\x1Av\xCAA\x18firestore.googleapis.com\xD2AXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xA5\x03\x0A\x1Dcom.google.firestore.admin.v1B\x13FirestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAL\x0A!firestore.googleapis.com/Location\x12'projects/{project}/locations/{location}\xEAAq\x0A(firestore.googleapis.com/CollectionGroup\x12Eprojects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php deleted file mode 100644 index 7832c5a6f905..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC6\x0D\x0A%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\"\x82\x0B\x0A\x05Index\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12@\x0A\x0Bquery_scope\x18\x02 \x01(\x0E2+.google.firestore.admin.v1.Index.QueryScope\x12<\x0A\x09api_scope\x18\x05 \x01(\x0E2).google.firestore.admin.v1.Index.ApiScope\x12;\x0A\x06fields\x18\x03 \x03(\x0B2+.google.firestore.admin.v1.Index.IndexField\x125\x0A\x05state\x18\x04 \x01(\x0E2&.google.firestore.admin.v1.Index.State\x12>\x0A\x07density\x18\x06 \x01(\x0E2(.google.firestore.admin.v1.Index.DensityB\x03\xE0A\x05\x12\x15\x0A\x08multikey\x18\x07 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Bshard_count\x18\x08 \x01(\x05B\x03\xE0A\x01\x12\x13\x0A\x06unique\x18\x0A \x01(\x08B\x03\xE0A\x01\x1A\xA2\x04\x0A\x0AIndexField\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12B\x0A\x05order\x18\x02 \x01(\x0E21.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\x0A\x0Carray_config\x18\x03 \x01(\x0E27.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\x0A\x0Dvector_config\x18\x04 \x01(\x0B28.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1A\x8F\x01\x0A\x0CVectorConfig\x12\x16\x0A\x09dimension\x18\x01 \x01(\x05B\x03\xE0A\x02\x12R\x0A\x04flat\x18\x02 \x01(\x0B2B.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1A\x0B\x0A\x09FlatIndexB\x06\x0A\x04type\"=\x0A\x05Order\x12\x15\x0A\x11ORDER_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"9\x0A\x0BArrayConfig\x12\x1C\x0A\x18ARRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CONTAINS\x10\x01B\x0C\x0A\x0Avalue_mode\"i\x0A\x0AQueryScope\x12\x1B\x0A\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOLLECTION\x10\x01\x12\x14\x0A\x10COLLECTION_GROUP\x10\x02\x12\x18\x0A\x14COLLECTION_RECURSIVE\x10\x03\"K\x0A\x08ApiScope\x12\x0B\x0A\x07ANY_API\x10\x00\x12\x16\x0A\x12DATASTORE_MODE_API\x10\x01\x12\x1A\x0A\x16MONGODB_COMPATIBLE_API\x10\x02\"I\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03\"M\x0A\x07Density\x12\x17\x0A\x13DENSITY_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ASPARSE_ALL\x10\x01\x12\x0E\x0A\x0ASPARSE_ANY\x10\x02\x12\x09\x0A\x05DENSE\x10\x03:z\xEAAw\x0A\x1Efirestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php deleted file mode 100644 index 95b567f8eaae..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC0\x02\x0A(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\x0A\x10LocationMetadataB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php deleted file mode 100644 index 9c8527e9e62e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAD\x1F\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xCF\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xE8\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\x124\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php deleted file mode 100644 index 554a536be61d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC1\x03\x0A0google/firestore/admin/v1/realtime_updates.proto\x12\x19google.firestore.admin.v1*\x83\x01\x0A\x13RealtimeUpdatesMode\x12%\x0A!REALTIME_UPDATES_MODE_UNSPECIFIED\x10\x00\x12!\x0A\x1DREALTIME_UPDATES_MODE_ENABLED\x10\x01\x12\"\x0A\x1EREALTIME_UPDATES_MODE_DISABLED\x10\x02B\xE3\x01\x0A\x1Dcom.google.firestore.admin.v1B\x14RealtimeUpdatesProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php deleted file mode 100644 index 045809417af4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCA\x07\x0A(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\"\xD6\x03\x0A\x0EBackupSchedule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12,\x0A\x09retention\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12F\x0A\x10daily_recurrence\x18\x07 \x01(\x0B2*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\x0A\x11weekly_recurrence\x18\x08 \x01(\x0B2+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xEAAt\x0A'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0C\x0A\x0Arecurrence\"\x11\x0A\x0FDailyRecurrence\"7\x0A\x10WeeklyRecurrence\x12#\x0A\x03day\x18\x02 \x01(\x0E2\x16.google.type.DayOfWeekB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php deleted file mode 100644 index ae50af2b85eb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8D\x04\x0A(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x9E\x01\x0A\x0CPitrSnapshot\x12;\x0A\x08database\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x02 \x01(\x0CB\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02B\xE0\x01\x0A\x1Dcom.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php deleted file mode 100644 index 801548a219df..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA5\x07\x0A*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB7\x04\x0A\x09UserCreds\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.firestore.admin.v1.UserCreds.StateB\x03\xE0A\x03\x12\x1C\x0A\x0Fsecure_password\x18\x05 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x11resource_identity\x18\x06 \x01(\x0B25.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1A*\x0A\x10ResourceIdentity\x12\x16\x0A\x09principal\x18\x01 \x01(\x09B\x03\xE0A\x03\"9\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02:}\xEAAz\x0A\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\x09userCreds2\x09userCredsB\x13\x0A\x11UserCredsIdentityB\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php deleted file mode 100644 index 1f840d0bcfc9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.admin.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_uid = ''; - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $snapshot_time = null; - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stats = null; - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * @type string $database - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * @type string $database_uid - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * @type \Google\Protobuf\Timestamp $snapshot_time - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The timestamp at which this backup expires. - * @type \Google\Cloud\Firestore\Admin\V1\Backup\Stats $stats - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * @type int $state - * Output only. The current state of the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseUid() - { - return $this->database_uid; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseUid($var) - { - GPBUtil::checkString($var, True); - $this->database_uid = $var; - - return $this; - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Backup\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Backup\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Backup\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php deleted file mode 100644 index a88be83f7339..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.admin.v1.Backup.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The pending backup is still being created. Operations on the - * backup will be rejected in this state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is complete and ready to use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The backup is not available at this moment. - * - * Generated from protobuf enum NOT_AVAILABLE = 3; - */ - const NOT_AVAILABLE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NOT_AVAILABLE => 'NOT_AVAILABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php deleted file mode 100644 index 830da955b0cd..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php +++ /dev/null @@ -1,139 +0,0 @@ -google.firestore.admin.v1.Backup.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $document_count = 0; - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $size_bytes - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * @type int|string $document_count - * Output only. The total number of documents contained in the backup. - * @type int|string $index_count - * Output only. The total number of index entries contained in the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDocumentCount() - { - return $this->document_count; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDocumentCount($var) - { - GPBUtil::checkInt64($var); - $this->document_count = $var; - - return $this; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getIndexCount() - { - return $this->index_count; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setIndexCount($var) - { - GPBUtil::checkInt64($var); - $this->index_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php deleted file mode 100644 index 2f86c6cbe31b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php +++ /dev/null @@ -1,316 +0,0 @@ -google.firestore.admin.v1.BackupSchedule - */ -class BackupSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - */ - protected $retention = null; - protected $recurrence; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * @type \Google\Protobuf\Duration $retention - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence - * For a schedule that runs daily. - * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence - * For a schedule that runs weekly on a specific day. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * 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. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * 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; - } - - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getRetention() - { - return $this->retention; - } - - public function hasRetention() - { - return isset($this->retention); - } - - public function clearRetention() - { - unset($this->retention); - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetention($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention = $var; - - return $this; - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null - */ - public function getDailyRecurrence() - { - return $this->readOneof(7); - } - - public function hasDailyRecurrence() - { - return $this->hasOneof(7); - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var - * @return $this - */ - public function setDailyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\DailyRecurrence::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null - */ - public function getWeeklyRecurrence() - { - return $this->readOneof(8); - } - - public function hasWeeklyRecurrence() - { - return $this->hasOneof(8); - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var - * @return $this - */ - public function setWeeklyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getRecurrence() - { - return $this->whichOneof("recurrence"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php deleted file mode 100644 index 37beadb05832..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsMetadata - */ -class BulkDeleteDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * The IDs of the collection groups that are being deleted. - * @type string[] $namespace_ids - * Which namespace IDs are being deleted. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php deleted file mode 100644 index b112a4710b9e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsRequest - */ -class BulkDeleteDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $collection_ids; - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsRequest - * - * @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. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * @type string[] $namespace_ids - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php deleted file mode 100644 index 7a6fa0418629..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsResponse - */ -class BulkDeleteDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php deleted file mode 100644 index 156b3e92f64f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php +++ /dev/null @@ -1,278 +0,0 @@ -google.firestore.admin.v1.CloneDatabaseMetadata - */ -class CloneDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - */ - protected $pitr_snapshot = null; - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - */ - protected $progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time the clone was started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the clone finished, unset for ongoing clones. - * @type int $operation_state - * The operation state of the clone. - * @type string $database - * The name of the database being cloned to. - * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot - * The snapshot from which this database was cloned. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage - * How far along the clone is as an estimated percentage of remaining time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null - */ - public function getPitrSnapshot() - { - return $this->pitr_snapshot; - } - - public function hasPitrSnapshot() - { - return isset($this->pitr_snapshot); - } - - public function clearPitrSnapshot() - { - unset($this->pitr_snapshot); - } - - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var - * @return $this - */ - public function setPitrSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); - $this->pitr_snapshot = $var; - - return $this; - } - - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - public function hasProgressPercentage() - { - return isset($this->progress_percentage); - } - - public function clearProgressPercentage() - { - unset($this->progress_percentage); - } - - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php deleted file mode 100644 index 16f607528833..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php +++ /dev/null @@ -1,284 +0,0 @@ -google.firestore.admin.v1.CloneDatabaseRequest - */ -class CloneDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pitr_snapshot = null; - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to clone the database in. Format is - * `projects/{project_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 project to clone the database in. Format is - * `projects/{project_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 ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null - */ - public function getPitrSnapshot() - { - return $this->pitr_snapshot; - } - - public function hasPitrSnapshot() - { - return isset($this->pitr_snapshot); - } - - public function clearPitrSnapshot() - { - unset($this->pitr_snapshot); - } - - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var - * @return $this - */ - public function setPitrSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); - $this->pitr_snapshot = $var; - - return $this; - } - - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php deleted file mode 100644 index 5b111b40539a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.admin.v1.CreateBackupScheduleRequest - */ -class CreateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - - /** - * @param string $parent Required. The parent database. - * - * Format `projects/{project}/databases/{database}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateBackupScheduleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule): self - { - return (new self()) - ->setParent($parent) - ->setBackupSchedule($backupSchedule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * 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 database. - * Format `projects/{project}/databases/{database}` - * - * 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 backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php deleted file mode 100644 index 6d7f95468786..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseMetadata - */ -class CreateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php deleted file mode 100644 index 11c925f81e0f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseRequest - */ -class CreateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The Database to create. - * @param string $databaseId Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * "(default)" database ID is also valid if the database is Standard edition. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateDatabaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Database $database, string $databaseId): self - { - return (new self()) - ->setParent($parent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The Database to create. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_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. A parent name of the form - * `projects/{project_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 Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php deleted file mode 100644 index cec053239e3a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.firestore.admin.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Index $index Required. The composite index to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateIndexRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Index $index): self - { - return (new self()) - ->setParent($parent) - ->setIndex($index); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * Required. The composite index to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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 composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php deleted file mode 100644 index 9e45f49e81ab..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.firestore.admin.v1.CreateUserCredsRequest - */ -class CreateUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_creds = null; - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_creds_id = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds Required. The user creds to create. - * @param string $userCredsId Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateUserCredsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds, string $userCredsId): self - { - return (new self()) - ->setParent($parent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds $user_creds - * Required. The user creds to create. - * @type string $user_creds_id - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_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. A parent name of the form - * `projects/{project_id}/databases/{database_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 user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\UserCreds|null - */ - public function getUserCreds() - { - return $this->user_creds; - } - - public function hasUserCreds() - { - return isset($this->user_creds); - } - - public function clearUserCreds() - { - unset($this->user_creds); - } - - /** - * Required. The user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $var - * @return $this - */ - public function setUserCreds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); - $this->user_creds = $var; - - return $this; - } - - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserCredsId() - { - return $this->user_creds_id; - } - - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserCredsId($var) - { - GPBUtil::checkString($var, True); - $this->user_creds_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php deleted file mode 100644 index 4f94e4e67e80..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.DailyRecurrence - */ -class DailyRecurrence extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php deleted file mode 100644 index 7d13814ea225..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,1125 +0,0 @@ -google.firestore.admin.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - */ - protected $location_id = ''; - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - */ - protected $type = 0; - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - */ - protected $concurrency_mode = 0; - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_retention_period = null; - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $earliest_version_time = null; - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - */ - protected $point_in_time_recovery_enablement = 0; - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - */ - protected $app_engine_integration_mode = 0; - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $key_prefix = ''; - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - */ - protected $delete_protection_state = 0; - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cmek_config = null; - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $previous_id = ''; - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_info = null; - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $free_tier = null; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - */ - protected $etag = ''; - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $database_edition = 0; - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $realtime_updates_mode = 0; - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $firestore_data_access_mode = 0; - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mongodb_compatible_data_access_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * @type string $uid - * Output only. The system-generated UUID4 for this Database. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * @type string $location_id - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * @type int $type - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * @type int $concurrency_mode - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * @type \Google\Protobuf\Duration $version_retention_period - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * @type \Google\Protobuf\Timestamp $earliest_version_time - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * @type int $point_in_time_recovery_enablement - * Whether to enable the PITR feature on this database. - * @type int $app_engine_integration_mode - * The App Engine integration mode to use for this database. - * @type string $key_prefix - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * @type int $delete_protection_state - * State of delete protection for the database. - * @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config - * Optional. Presence indicates CMEK is enabled for this database. - * @type string $previous_id - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info - * Output only. Information about the provenance of this database. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * @type bool $free_tier - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type int $database_edition - * Immutable. The edition of the database. - * @type int $realtime_updates_mode - * Immutable. The default Realtime Updates mode to use for this database. - * @type int $firestore_data_access_mode - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * @type int $mongodb_compatible_data_access_mode - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); - $this->type = $var; - - return $this; - } - - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @return int - */ - public function getConcurrencyMode() - { - return $this->concurrency_mode; - } - - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @param int $var - * @return $this - */ - public function setConcurrencyMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); - $this->concurrency_mode = $var; - - return $this; - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getVersionRetentionPeriod() - { - return $this->version_retention_period; - } - - public function hasVersionRetentionPeriod() - { - return isset($this->version_retention_period); - } - - public function clearVersionRetentionPeriod() - { - unset($this->version_retention_period); - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVersionRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->version_retention_period = $var; - - return $this; - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVersionTime() - { - return $this->earliest_version_time; - } - - public function hasEarliestVersionTime() - { - return isset($this->earliest_version_time); - } - - public function clearEarliestVersionTime() - { - unset($this->earliest_version_time); - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVersionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_version_time = $var; - - return $this; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @return int - */ - public function getPointInTimeRecoveryEnablement() - { - return $this->point_in_time_recovery_enablement; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @param int $var - * @return $this - */ - public function setPointInTimeRecoveryEnablement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class); - $this->point_in_time_recovery_enablement = $var; - - return $this; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @return int - */ - public function getAppEngineIntegrationMode() - { - return $this->app_engine_integration_mode; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @param int $var - * @return $this - */ - public function setAppEngineIntegrationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); - $this->app_engine_integration_mode = $var; - - return $this; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKeyPrefix() - { - return $this->key_prefix; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKeyPrefix($var) - { - GPBUtil::checkString($var, True); - $this->key_prefix = $var; - - return $this; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @return int - */ - public function getDeleteProtectionState() - { - return $this->delete_protection_state; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @param int $var - * @return $this - */ - public function setDeleteProtectionState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class); - $this->delete_protection_state = $var; - - return $this; - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null - */ - public function getCmekConfig() - { - return $this->cmek_config; - } - - public function hasCmekConfig() - { - return isset($this->cmek_config); - } - - public function clearCmekConfig() - { - unset($this->cmek_config); - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var - * @return $this - */ - public function setCmekConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class); - $this->cmek_config = $var; - - return $this; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPreviousId() - { - return $this->previous_id; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPreviousId($var) - { - GPBUtil::checkString($var, True); - $this->previous_id = $var; - - return $this; - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null - */ - public function getSourceInfo() - { - return $this->source_info; - } - - public function hasSourceInfo() - { - return isset($this->source_info); - } - - public function clearSourceInfo() - { - unset($this->source_info); - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var - * @return $this - */ - public function setSourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class); - $this->source_info = $var; - - return $this; - } - - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getFreeTier() - { - return isset($this->free_tier) ? $this->free_tier : false; - } - - public function hasFreeTier() - { - return isset($this->free_tier); - } - - public function clearFreeTier() - { - unset($this->free_tier); - } - - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setFreeTier($var) - { - GPBUtil::checkBool($var); - $this->free_tier = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDatabaseEdition() - { - return $this->database_edition; - } - - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDatabaseEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseEdition::class); - $this->database_edition = $var; - - return $this; - } - - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getRealtimeUpdatesMode() - { - return $this->realtime_updates_mode; - } - - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setRealtimeUpdatesMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\RealtimeUpdatesMode::class); - $this->realtime_updates_mode = $var; - - return $this; - } - - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFirestoreDataAccessMode() - { - return $this->firestore_data_access_mode; - } - - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFirestoreDataAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); - $this->firestore_data_access_mode = $var; - - return $this; - } - - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMongodbCompatibleDataAccessMode() - { - return $this->mongodb_compatible_data_access_mode; - } - - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMongodbCompatibleDataAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); - $this->mongodb_compatible_data_access_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php deleted file mode 100644 index f81ca80beab3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.firestore.admin.v1.Database.AppEngineIntegrationMode - */ -class AppEngineIntegrationMode -{ - /** - * Not used. - * - * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - */ - const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - /** - * If an App Engine application exists in the same region as this database, - * App Engine configuration will impact this database. This includes - * disabling of the application & database, as well as disabling writes to - * the database. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * App Engine has no effect on the ability of this database to serve - * requests. - * This is the default setting for databases created with the Firestore API. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php deleted file mode 100644 index 2178af095d91..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -google.firestore.admin.v1.Database.CmekConfig - */ -class CmekConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $active_key_version; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * @type string[] $active_key_version - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getActiveKeyVersion() - { - return $this->active_key_version; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setActiveKeyVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->active_key_version = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php deleted file mode 100644 index f34e9bce6751..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.admin.v1.Database.ConcurrencyMode - */ -class ConcurrencyMode -{ - /** - * Not used. - * - * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; - */ - const CONCURRENCY_MODE_UNSPECIFIED = 0; - /** - * Use optimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore Enterprise Edition - * databases. - * - * Generated from protobuf enum OPTIMISTIC = 1; - */ - const OPTIMISTIC = 1; - /** - * Use pessimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore Standard Edition - * databases. - * - * Generated from protobuf enum PESSIMISTIC = 2; - */ - const PESSIMISTIC = 2; - /** - * Use optimistic concurrency control with entity groups by default. - * This mode is enabled for some databases that were automatically upgraded - * from Cloud Datastore to Cloud Firestore with Datastore Mode. - * It is not recommended for any new databases, and not supported for - * Firestore Native databases. - * - * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - */ - const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - - private static $valueToName = [ - self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', - self::OPTIMISTIC => 'OPTIMISTIC', - self::PESSIMISTIC => 'PESSIMISTIC', - self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php deleted file mode 100644 index 1768bbfdf76f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Database.DataAccessMode - */ -class DataAccessMode -{ - /** - * Not Used. - * - * Generated from protobuf enum DATA_ACCESS_MODE_UNSPECIFIED = 0; - */ - const DATA_ACCESS_MODE_UNSPECIFIED = 0; - /** - * Accessing the database through the API is allowed. - * - * Generated from protobuf enum DATA_ACCESS_MODE_ENABLED = 1; - */ - const DATA_ACCESS_MODE_ENABLED = 1; - /** - * Accessing the database through the API is disallowed. - * - * Generated from protobuf enum DATA_ACCESS_MODE_DISABLED = 2; - */ - const DATA_ACCESS_MODE_DISABLED = 2; - - private static $valueToName = [ - self::DATA_ACCESS_MODE_UNSPECIFIED => 'DATA_ACCESS_MODE_UNSPECIFIED', - self::DATA_ACCESS_MODE_ENABLED => 'DATA_ACCESS_MODE_ENABLED', - self::DATA_ACCESS_MODE_DISABLED => 'DATA_ACCESS_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php deleted file mode 100644 index 9102fcdc721b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php +++ /dev/null @@ -1,62 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseEdition - */ -class DatabaseEdition -{ - /** - * Not used. - * - * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; - */ - const DATABASE_EDITION_UNSPECIFIED = 0; - /** - * Standard edition. - * This is the default setting if not specified. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Enterprise edition. - * - * Generated from protobuf enum ENTERPRISE = 2; - */ - const ENTERPRISE = 2; - - private static $valueToName = [ - self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::ENTERPRISE => 'ENTERPRISE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php deleted file mode 100644 index 930fddf71f6f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseType - */ -class DatabaseType -{ - /** - * Not used. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Firestore Native Mode - * - * Generated from protobuf enum FIRESTORE_NATIVE = 1; - */ - const FIRESTORE_NATIVE = 1; - /** - * Firestore in Datastore Mode. - * - * Generated from protobuf enum DATASTORE_MODE = 2; - */ - const DATASTORE_MODE = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', - self::DATASTORE_MODE => 'DATASTORE_MODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php deleted file mode 100644 index 299230749a07..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Database.DeleteProtectionState - */ -class DeleteProtectionState -{ - /** - * The default value. Delete protection type is not specified - * - * Generated from protobuf enum DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - */ - const DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - /** - * Delete protection is disabled - * - * Generated from protobuf enum DELETE_PROTECTION_DISABLED = 1; - */ - const DELETE_PROTECTION_DISABLED = 1; - /** - * Delete protection is enabled - * - * Generated from protobuf enum DELETE_PROTECTION_ENABLED = 2; - */ - const DELETE_PROTECTION_ENABLED = 2; - - private static $valueToName = [ - self::DELETE_PROTECTION_STATE_UNSPECIFIED => 'DELETE_PROTECTION_STATE_UNSPECIFIED', - self::DELETE_PROTECTION_DISABLED => 'DELETE_PROTECTION_DISABLED', - self::DELETE_PROTECTION_ENABLED => 'DELETE_PROTECTION_ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php deleted file mode 100644 index 510f8a24fa1d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php +++ /dev/null @@ -1,144 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - protected $encryption_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $google_default_encryption - * Use Google default encryption. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $use_source_encryption - * The database will use the same encryption configuration as the source. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $customer_managed_encryption - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions|null - */ - public function getGoogleDefaultEncryption() - { - return $this->readOneof(1); - } - - public function hasGoogleDefaultEncryption() - { - return $this->hasOneof(1); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $var - * @return $this - */ - public function setGoogleDefaultEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions|null - */ - public function getUseSourceEncryption() - { - return $this->readOneof(2); - } - - public function hasUseSourceEncryption() - { - return $this->hasOneof(2); - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $var - * @return $this - */ - public function setUseSourceEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions|null - */ - public function getCustomerManagedEncryption() - { - return $this->readOneof(3); - } - - public function hasCustomerManagedEncryption() - { - return $this->hasOneof(3); - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $var - * @return $this - */ - public function setCustomerManagedEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncryptionType() - { - return $this->whichOneof("encryption_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php deleted file mode 100644 index 17074d4754ef..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php +++ /dev/null @@ -1,96 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions - */ -class CustomerManagedEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php deleted file mode 100644 index 3c68de993d27..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions - */ -class GoogleDefaultEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php deleted file mode 100644 index 245e680690bc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions - */ -class SourceEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php deleted file mode 100644 index fff9f69765f7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - */ -class PointInTimeRecoveryEnablement -{ - /** - * Not used. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - */ - const POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - /** - * Reads are supported on selected versions of the data from within the past - * 7 days: - * * Reads against any timestamp within the past hour - * * Reads against 1-minute snapshots beyond 1 hour and within 7 days - * `version_retention_period` and `earliest_version_time` can be - * used to determine the supported versions. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLED = 1; - */ - const POINT_IN_TIME_RECOVERY_ENABLED = 1; - /** - * Reads are supported on any version of the data from within the past 1 - * hour. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_DISABLED = 2; - */ - const POINT_IN_TIME_RECOVERY_DISABLED = 2; - - private static $valueToName = [ - self::POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED => 'POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED', - self::POINT_IN_TIME_RECOVERY_ENABLED => 'POINT_IN_TIME_RECOVERY_ENABLED', - self::POINT_IN_TIME_RECOVERY_DISABLED => 'POINT_IN_TIME_RECOVERY_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php deleted file mode 100644 index 4677a5d1b31b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo - */ -class SourceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - */ - protected $operation = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $backup - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * @type string $operation - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource|null - */ - public function getBackup() - { - return $this->readOneof(1); - } - - public function hasBackup() - { - return $this->hasOneof(1); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php deleted file mode 100644 index 43ccc3a5167b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo.BackupSource - */ -class BackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php deleted file mode 100644 index 2495637aee5b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup to delete. - * - * format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupRequest - * - * @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. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php deleted file mode 100644 index db965ce73d76..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.firestore.admin.v1.DeleteBackupScheduleRequest - */ -class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php deleted file mode 100644 index a1573dc43b4c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseMetadata - */ -class DeleteDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php deleted file mode 100644 index cc25c2af8af8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseRequest - */ -class DeleteDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteDatabaseRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}` - * @type string $etag - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_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; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php deleted file mode 100644 index af55872cb361..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php deleted file mode 100644 index 5b8386eac930..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DeleteUserCredsRequest - */ -class DeleteUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteUserCredsRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php deleted file mode 100644 index df8d6e29323a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DisableUserCredsRequest - */ -class DisableUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DisableUserCredsRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php deleted file mode 100644 index 15bfff96c98b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.EnableUserCredsRequest - */ -class EnableUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\EnableUserCredsRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php deleted file mode 100644 index 9af4ec049423..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php +++ /dev/null @@ -1,403 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsMetadata - */ -class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - */ - protected $output_uri_prefix = ''; - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the export operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * Which collection IDs are being exported. - * @type string $output_uri_prefix - * Where the documents are being exported to. - * @type string[] $namespace_ids - * Which namespace IDs are being exported. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php deleted file mode 100644 index eb91d63fb295..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php +++ /dev/null @@ -1,305 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsRequest - */ -class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - */ - protected $output_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - */ - protected $snapshot_time = null; - - /** - * @param string $name Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest - * - * @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. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * @type string $output_uri_prefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * @type string[] $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php deleted file mode 100644 index 63aac67f8b8a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsResponse - */ -class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php deleted file mode 100644 index 28645d2447cf..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,253 +0,0 @@ -google.firestore.admin.v1.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - */ - protected $index_config = null; - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - */ - protected $ttl_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null - */ - public function getIndexConfig() - { - return $this->index_config; - } - - public function hasIndexConfig() - { - return isset($this->index_config); - } - - public function clearIndexConfig() - { - unset($this->index_config); - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var - * @return $this - */ - public function setIndexConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); - $this->index_config = $var; - - return $this; - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null - */ - public function getTtlConfig() - { - return $this->ttl_config; - } - - public function hasTtlConfig() - { - return isset($this->ttl_config); - } - - public function clearTtlConfig() - { - unset($this->ttl_config); - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var - * @return $this - */ - public function setTtlConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); - $this->ttl_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php deleted file mode 100644 index 7c74b5f4b7b5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php +++ /dev/null @@ -1,205 +0,0 @@ -google.firestore.admin.v1.Field.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - */ - protected $uses_ancestor_config = false; - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - */ - protected $ancestor_field = ''; - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - */ - protected $reverting = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes - * The indexes supported for this field. - * @type bool $uses_ancestor_config - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * @type string $ancestor_field - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * @type bool $reverting - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @return bool - */ - public function getUsesAncestorConfig() - { - return $this->uses_ancestor_config; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @param bool $var - * @return $this - */ - public function setUsesAncestorConfig($var) - { - GPBUtil::checkBool($var); - $this->uses_ancestor_config = $var; - - return $this; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @return string - */ - public function getAncestorField() - { - return $this->ancestor_field; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @param string $var - * @return $this - */ - public function setAncestorField($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_field = $var; - - return $this; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @return bool - */ - public function getReverting() - { - return $this->reverting; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @param bool $var - * @return $this - */ - public function setReverting($var) - { - GPBUtil::checkBool($var); - $this->reverting = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php deleted file mode 100644 index 664a2ae55edb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php +++ /dev/null @@ -1,140 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig - */ -class TtlConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $expiration_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the TTL configuration. - * @type \Google\Protobuf\Duration $expiration_offset - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getExpirationOffset() - { - return $this->expiration_offset; - } - - public function hasExpirationOffset() - { - return isset($this->expiration_offset); - } - - public function clearExpirationOffset() - { - unset($this->expiration_offset); - } - - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExpirationOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->expiration_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php deleted file mode 100644 index 3f5647cd9139..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig.State - */ -class State -{ - /** - * The state is unspecified or unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The TTL is being applied. There is an active long-running operation to - * track the change. Newly written documents will have TTLs applied as - * requested. Requested TTLs on existing documents are still being - * processed. When TTLs on all existing documents have been processed, the - * state will move to 'ACTIVE'. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The TTL is active for all documents. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The TTL configuration could not be enabled for all existing documents. - * Newly written documents will continue to have their TTL applied. - * The LRO returned when last attempting to enable TTL for this `Field` - * has failed, and may have more details. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php deleted file mode 100644 index 8df053b4e432..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata - */ -class FieldOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - */ - protected $field = ''; - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - */ - private $index_config_deltas; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - */ - protected $progress_bytes = null; - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - */ - protected $ttl_config_delta = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $field - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $index_config_deltas - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta - * Describes the deltas of TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta> - */ - public function getIndexConfigDeltas() - { - return $this->index_config_deltas; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $var - * @return $this - */ - public function setIndexConfigDeltas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); - $this->index_config_deltas = $arr; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null - */ - public function getTtlConfigDelta() - { - return $this->ttl_config_delta; - } - - public function hasTtlConfigDelta() - { - return isset($this->ttl_config_delta); - } - - public function clearTtlConfigDelta() - { - unset($this->ttl_config_delta); - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var - * @return $this - */ - public function setTtlConfigDelta($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); - $this->ttl_config_delta = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php deleted file mode 100644 index 212f34a5b90c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php +++ /dev/null @@ -1,111 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - */ -class IndexConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - */ - protected $index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the index is changing. - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * The index being changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php deleted file mode 100644 index cf7058555cad..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The single field index is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The single field index is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php deleted file mode 100644 index 7e4bcbf2e563..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php +++ /dev/null @@ -1,115 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - */ -class TtlConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - */ - protected $expiration_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the TTL configuration is changing. - * @type \Google\Protobuf\Duration $expiration_offset - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getExpirationOffset() - { - return $this->expiration_offset; - } - - public function hasExpirationOffset() - { - return isset($this->expiration_offset); - } - - public function clearExpirationOffset() - { - unset($this->expiration_offset); - } - - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExpirationOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->expiration_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php deleted file mode 100644 index ce9d1598e609..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The TTL config is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The TTL config is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php deleted file mode 100644 index 509497b1c82f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup to fetch. - * - * Format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupRequest - * - * @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. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php deleted file mode 100644 index efb9342983af..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php +++ /dev/null @@ -1,93 +0,0 @@ -google.firestore.admin.v1.GetBackupScheduleRequest - */ -class GetBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php deleted file mode 100644 index de4fafa9bb43..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetDatabaseRequest - */ -class GetDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_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. A name of the form - * `projects/{project_id}/databases/{database_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php deleted file mode 100644 index 98a81de0b9cc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetFieldRequest - */ -class GetFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * Please see {@see FirestoreAdminClient::fieldName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetFieldRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php deleted file mode 100644 index 832f881b9b21..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetIndexRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php deleted file mode 100644 index 4c672c6b75f3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetUserCredsRequest - */ -class GetUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetUserCredsRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php deleted file mode 100644 index e6ce541ffbed..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - */ - protected $input_uri_prefix = ''; - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the import operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * Which collection IDs are being imported. - * @type string $input_uri_prefix - * The location of the documents being imported. - * @type string[] $namespace_ids - * Which namespace IDs are being imported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php deleted file mode 100644 index e59bbc42fc7f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - */ - protected $input_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest - * - * @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. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * @type string $input_uri_prefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * @type string[] $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_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; - } - - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php deleted file mode 100644 index ad324a132809..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,432 +0,0 @@ -google.firestore.admin.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - */ - protected $query_scope = 0; - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - */ - protected $api_scope = 0; - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - */ - private $fields; - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - */ - protected $state = 0; - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $density = 0; - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multikey = false; - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shard_count = 0; - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * @type int $query_scope - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * @type int $api_scope - * The API scope supported by this index. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $fields - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * @type int $state - * Output only. The serving state of the index. - * @type int $density - * Immutable. The density configuration of the index. - * @type bool $multikey - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * @type int $shard_count - * Optional. The number of shards for the index. - * @type bool $unique - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @return int - */ - public function getQueryScope() - { - return $this->query_scope; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @param int $var - * @return $this - */ - public function setQueryScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); - $this->query_scope = $var; - - return $this; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @return int - */ - public function getApiScope() - { - return $this->api_scope; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @param int $var - * @return $this - */ - public function setApiScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\ApiScope::class); - $this->api_scope = $var; - - return $this; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index\IndexField> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); - $this->state = $var; - - return $this; - } - - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDensity() - { - return $this->density; - } - - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDensity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\Density::class); - $this->density = $var; - - return $this; - } - - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMultikey() - { - return $this->multikey; - } - - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMultikey($var) - { - GPBUtil::checkBool($var); - $this->multikey = $var; - - return $this; - } - - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUnique() - { - return $this->unique; - } - - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUnique($var) - { - GPBUtil::checkBool($var); - $this->unique = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php deleted file mode 100644 index 82f955ef90e9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php +++ /dev/null @@ -1,63 +0,0 @@ -google.firestore.admin.v1.Index.ApiScope - */ -class ApiScope -{ - /** - * The index can only be used by the Firestore Native query API. - * This is the default. - * - * Generated from protobuf enum ANY_API = 0; - */ - const ANY_API = 0; - /** - * The index can only be used by the Firestore in Datastore Mode query API. - * - * Generated from protobuf enum DATASTORE_MODE_API = 1; - */ - const DATASTORE_MODE_API = 1; - /** - * The index can only be used by the MONGODB_COMPATIBLE_API. - * - * Generated from protobuf enum MONGODB_COMPATIBLE_API = 2; - */ - const MONGODB_COMPATIBLE_API = 2; - - private static $valueToName = [ - self::ANY_API => 'ANY_API', - self::DATASTORE_MODE_API => 'DATASTORE_MODE_API', - self::MONGODB_COMPATIBLE_API => 'MONGODB_COMPATIBLE_API', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php deleted file mode 100644 index 1ceec9170909..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.admin.v1.Index.Density - */ -class Density -{ - /** - * Unspecified. It will use database default setting. This value is input - * only. - * - * Generated from protobuf enum DENSITY_UNSPECIFIED = 0; - */ - const DENSITY_UNSPECIFIED = 0; - /** - * An index entry will only exist if ALL fields are present in the document. - * This is both the default and only allowed value for Standard Edition - * databases (for both Cloud Firestore `ANY_API` and Cloud Datastore - * `DATASTORE_MODE_API`). - * Take for example the following document: - * ``` - * { - * "__name__": "...", - * "a": 1, - * "b": 2, - * "c": 3 - * } - * ``` - * an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index - * entry for this document since `a`, 'b', `c`, and `__name__` are all - * present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate - * an index entry for this document since `d` is missing. - * This means that such indexes can only be used to serve a query when the - * query has either implicit or explicit requirements that all fields from - * the index are present. - * - * Generated from protobuf enum SPARSE_ALL = 1; - */ - const SPARSE_ALL = 1; - /** - * An index entry will exist if ANY field are present in the document. - * This is used as the definition of a sparse index for Enterprise Edition - * databases. - * Take for example the following document: - * ``` - * { - * "__name__": "...", - * "a": 1, - * "b": 2, - * "c": 3 - * } - * ``` - * an index on `(a ASC, d ASC)` will generate an index entry for this - * document since `a` is present, and will fill in an `unset` value for `d`. - * An index on `(d ASC, e ASC)` will not generate any index entry as neither - * `d` nor `e` are present. - * An index that contains `__name__` will generate an index entry for all - * documents since Firestore guarantees that all documents have a `__name__` - * field. - * - * Generated from protobuf enum SPARSE_ANY = 2; - */ - const SPARSE_ANY = 2; - /** - * An index entry will exist regardless of if the fields are present or not. - * This is the default density for an Enterprise Edition database. - * The index will store `unset` values for fields that are not present in - * the document. - * - * Generated from protobuf enum DENSE = 3; - */ - const DENSE = 3; - - private static $valueToName = [ - self::DENSITY_UNSPECIFIED => 'DENSITY_UNSPECIFIED', - self::SPARSE_ALL => 'SPARSE_ALL', - self::SPARSE_ANY => 'SPARSE_ANY', - self::DENSE => 'DENSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php deleted file mode 100644 index 9eb85626fcba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php +++ /dev/null @@ -1,191 +0,0 @@ -google.firestore.admin.v1.Index.IndexField - */ -class IndexField extends \Google\Protobuf\Internal\Message -{ - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $value_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * @type int $order - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * @type int $array_config - * Indicates that this field supports operations on `array_value`s. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $vector_config - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @return int - */ - public function getOrder() - { - return $this->readOneof(2); - } - - public function hasOrder() - { - return $this->hasOneof(2); - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @return int - */ - public function getArrayConfig() - { - return $this->readOneof(3); - } - - public function hasArrayConfig() - { - return $this->hasOneof(3); - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @param int $var - * @return $this - */ - public function setArrayConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig|null - */ - public function getVectorConfig() - { - return $this->readOneof(4); - } - - public function hasVectorConfig() - { - return $this->hasOneof(4); - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $var - * @return $this - */ - public function setVectorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueMode() - { - return $this->whichOneof("value_mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php deleted file mode 100644 index e44e7c449bba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php +++ /dev/null @@ -1,54 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.ArrayConfig - */ -class ArrayConfig -{ - /** - * The index does not support additional array queries. - * - * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; - */ - const ARRAY_CONFIG_UNSPECIFIED = 0; - /** - * The index supports array containment queries. - * - * Generated from protobuf enum CONTAINS = 1; - */ - const CONTAINS = 1; - - private static $valueToName = [ - self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', - self::CONTAINS => 'CONTAINS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php deleted file mode 100644 index 6c7b3ab13bc3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.Order - */ -class Order -{ - /** - * The ordering is unspecified. Not a valid option. - * - * Generated from protobuf enum ORDER_UNSPECIFIED = 0; - */ - const ORDER_UNSPECIFIED = 0; - /** - * The field is ordered by ascending field value. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * The field is ordered by descending field value. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php deleted file mode 100644 index f1cbd5ee0352..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig - */ -class VectorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dimension = 0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $dimension - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $flat - * Indicates the vector index is a flat index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDimension() - { - return $this->dimension; - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkInt32($var); - $this->dimension = $var; - - return $this; - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null - */ - public function getFlat() - { - return $this->readOneof(2); - } - - public function hasFlat() - { - return $this->hasOneof(2); - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $var - * @return $this - */ - public function setFlat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php deleted file mode 100644 index 6247e505d63a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex - */ -class FlatIndex extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php deleted file mode 100644 index a2bee11d68a8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php +++ /dev/null @@ -1,74 +0,0 @@ -google.firestore.admin.v1.Index.QueryScope - */ -class QueryScope -{ - /** - * The query scope is unspecified. Not a valid option. - * - * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; - */ - const QUERY_SCOPE_UNSPECIFIED = 0; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified - * at query time, and that has the collection ID specified by the index. - * - * Generated from protobuf enum COLLECTION = 1; - */ - const COLLECTION = 1; - /** - * Indexes with a collection group query scope specified allow queries - * against all collections that has the collection ID specified by the - * index. - * - * Generated from protobuf enum COLLECTION_GROUP = 2; - */ - const COLLECTION_GROUP = 2; - /** - * Include all the collections's ancestor in the index. Only available for - * Datastore Mode databases. - * - * Generated from protobuf enum COLLECTION_RECURSIVE = 3; - */ - const COLLECTION_RECURSIVE = 3; - - private static $valueToName = [ - self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', - self::COLLECTION => 'COLLECTION', - self::COLLECTION_GROUP => 'COLLECTION_GROUP', - self::COLLECTION_RECURSIVE => 'COLLECTION_RECURSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php deleted file mode 100644 index bf31eec158a0..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.admin.v1.Index.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The index is being created. - * There is an active long-running operation for the index. - * The index is updated when writing a document. - * Some index data may exist. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The index is ready to be used. - * The index is updated when writing a document. - * The index is fully populated from all stored documents it applies to. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The index was being created, but something went wrong. - * There is no active long-running operation for the index, - * and the most recently finished long-running operation failed. - * The index is not updated when writing a document. - * Some index data may exist. - * Use the google.longrunning.Operations API to determine why the operation - * that last attempted to create this index failed, then re-create the - * index. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php deleted file mode 100644 index e9cec99074ea..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php +++ /dev/null @@ -1,287 +0,0 @@ -google.firestore.admin.v1.IndexOperationMetadata - */ -class IndexOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - */ - protected $index = ''; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - */ - protected $progress_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $index - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php deleted file mode 100644 index d05171b63611..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesRequest - */ -class ListBackupSchedulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The parent database. - * - * Format is `projects/{project}/databases/{database}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesRequest - * - * @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 database. - * Format is `projects/{project}/databases/{database}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * 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 database. - * Format is `projects/{project}/databases/{database}`. - * - * 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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php deleted file mode 100644 index 230e34ceb900..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesResponse - */ -class ListBackupSchedulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - */ - private $backup_schedules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $backup_schedules - * List of all backup schedules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\BackupSchedule> - */ - public function getBackupSchedules() - { - return $this->backup_schedules; - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $var - * @return $this - */ - public function setBackupSchedules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php deleted file mode 100644 index 6c6222670971..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.firestore.admin.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The location to list backups from. - * - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. Please see - * {@see FirestoreAdminClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * @type string $filter - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php deleted file mode 100644 index 8b2b6447cb77..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.admin.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - */ - private $backups; - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Backup[] $backups - * List of all backups for the project. - * @type string[] $unreachable - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Backup> - */ - public function getBackups() - { - return $this->backups; - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Backup[] $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php deleted file mode 100644 index 8476d8052464..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.ListDatabasesRequest - */ -class ListDatabasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest - * - * @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. A parent name of the form - * `projects/{project_id}` - * @type bool $show_deleted - * If true, also returns deleted resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_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. A parent name of the form - * `projects/{project_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; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php deleted file mode 100644 index f3a9c42afa12..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.ListDatabasesResponse - */ -class ListDatabasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - */ - private $databases; - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database[] $databases - * The databases in the project. - * @type string[] $unreachable - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Database> - */ - public function getDatabases() - { - return $this->databases; - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database[] $var - * @return $this - */ - public function setDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->databases = $arr; - - return $this; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php deleted file mode 100644 index 8596394a0bb5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.firestore.admin.v1.ListFieldsRequest - */ -class ListFieldsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest - * - * @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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * 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; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php deleted file mode 100644 index 7273ec784839..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListFieldsResponse - */ -class ListFieldsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - */ - private $fields; - /** - * A page token that may be used to request another page of results. If blank, - * this is 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 \Google\Cloud\Firestore\Admin\V1\Field[] $fields - * The requested fields. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Field> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Field[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->fields = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php deleted file mode 100644 index cb2ca52982de..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.firestore.admin.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest - * - * @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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_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; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * 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; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php deleted file mode 100644 index 2306044b0674..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * A page token that may be used to request another page of results. If blank, - * this is 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 \Google\Cloud\Firestore\Admin\V1\Index[] $indexes - * The requested indexes. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php deleted file mode 100644 index c8d03d1b1d3b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.ListUserCredsRequest - */ -class ListUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListUserCredsRequest - * - * @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. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_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. A parent database name of the form - * `projects/{project_id}/databases/{database_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; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php deleted file mode 100644 index af839e0ebc78..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.ListUserCredsResponse - */ -class ListUserCredsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - */ - private $user_creds; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds[] $user_creds - * The user creds for the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\UserCreds> - */ - public function getUserCreds() - { - return $this->user_creds; - } - - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds[] $var - * @return $this - */ - public function setUserCreds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); - $this->user_creds = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php deleted file mode 100644 index 995a7845b650..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php deleted file mode 100644 index 73244df17d28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php +++ /dev/null @@ -1,98 +0,0 @@ -google.firestore.admin.v1.OperationState - */ -class OperationState -{ - /** - * Unspecified. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Request is being prepared for processing. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 2; - */ - const PROCESSING = 2; - /** - * Request is in the process of being cancelled after user called - * google.longrunning.Operations.CancelOperation on the operation. - * - * Generated from protobuf enum CANCELLING = 3; - */ - const CANCELLING = 3; - /** - * Request has been processed and is in its finalization stage. - * - * Generated from protobuf enum FINALIZING = 4; - */ - const FINALIZING = 4; - /** - * Request has completed successfully. - * - * Generated from protobuf enum SUCCESSFUL = 5; - */ - const SUCCESSFUL = 5; - /** - * Request has finished being processed, but encountered an error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Request has finished being cancelled after user called - * google.longrunning.Operations.CancelOperation. - * - * Generated from protobuf enum CANCELLED = 7; - */ - const CANCELLED = 7; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::PROCESSING => 'PROCESSING', - self::CANCELLING => 'CANCELLING', - self::FINALIZING => 'FINALIZING', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php deleted file mode 100644 index 1d3ed47beeef..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php +++ /dev/null @@ -1,153 +0,0 @@ -google.firestore.admin.v1.PitrSnapshot - */ -class PitrSnapshot extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_uid = ''; - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * @type string $database_uid - * Output only. Public UUID of the database the snapshot was associated with. - * @type \Google\Protobuf\Timestamp $snapshot_time - * Required. Snapshot time of the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseUid() - { - return $this->database_uid; - } - - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseUid($var) - { - GPBUtil::checkString($var, False); - $this->database_uid = $var; - - return $this; - } - - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php deleted file mode 100644 index f7c35b1de363..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php +++ /dev/null @@ -1,103 +0,0 @@ -google.firestore.admin.v1.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - */ - protected $estimated_work = 0; - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - */ - protected $completed_work = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_work - * The amount of work estimated. - * @type int|string $completed_work - * The amount of work completed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @return int|string - */ - public function getEstimatedWork() - { - return $this->estimated_work; - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @param int|string $var - * @return $this - */ - public function setEstimatedWork($var) - { - GPBUtil::checkInt64($var); - $this->estimated_work = $var; - - return $this; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @return int|string - */ - public function getCompletedWork() - { - return $this->completed_work; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @param int|string $var - * @return $this - */ - public function setCompletedWork($var) - { - GPBUtil::checkInt64($var); - $this->completed_work = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php deleted file mode 100644 index a9a985996dba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.firestore.admin.v1.RealtimeUpdatesMode - */ -class RealtimeUpdatesMode -{ - /** - * The Realtime Updates feature is not specified. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_UNSPECIFIED = 0; - */ - const REALTIME_UPDATES_MODE_UNSPECIFIED = 0; - /** - * The Realtime Updates feature is enabled by default. - * This could potentially degrade write performance for the database. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_ENABLED = 1; - */ - const REALTIME_UPDATES_MODE_ENABLED = 1; - /** - * The Realtime Updates feature is disabled by default. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_DISABLED = 2; - */ - const REALTIME_UPDATES_MODE_DISABLED = 2; - - private static $valueToName = [ - self::REALTIME_UPDATES_MODE_UNSPECIFIED => 'REALTIME_UPDATES_MODE_UNSPECIFIED', - self::REALTIME_UPDATES_MODE_ENABLED => 'REALTIME_UPDATES_MODE_ENABLED', - self::REALTIME_UPDATES_MODE_DISABLED => 'REALTIME_UPDATES_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php deleted file mode 100644 index 191470b20c2f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.ResetUserPasswordRequest - */ -class ResetUserPasswordRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ResetUserPasswordRequest - * - * @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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php deleted file mode 100644 index 836cf1956dca..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseMetadata - */ -class RestoreDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - */ - protected $progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time the restore was started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the restore finished, unset for ongoing restores. - * @type int $operation_state - * The operation state of the restore. - * @type string $database - * The name of the database being restored to. - * @type string $backup - * The name of the backup restoring from. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage - * How far along the restore is as an estimated percentage of remaining time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @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); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @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); - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - public function hasProgressPercentage() - { - return isset($this->progress_percentage); - } - - public function clearProgressPercentage() - { - unset($this->progress_percentage); - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php deleted file mode 100644 index 7c2236e7bd2d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseRequest - */ -class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * @type string $backup - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to restore the database in. Format is - * `projects/{project_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 project to restore the database in. Format is - * `projects/{project_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 ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php deleted file mode 100644 index 9ef06f95585e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateBackupScheduleRequest - */ -class UpdateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateBackupScheduleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupSchedule($backupSchedule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php deleted file mode 100644 index 189e1d6c5a6c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseMetadata - */ -class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php deleted file mode 100644 index 3d9cfcf3df23..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseRequest - */ -class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The database to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Database $database, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDatabase($database) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The database to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php deleted file mode 100644 index 4c1e8af65c10..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.firestore.admin.v1.UpdateFieldRequest - */ -class UpdateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field = null; - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Field $field Required. The field to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Field $field): self - { - return (new self()) - ->setField($field); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Field $field - * Required. The field to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Field|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Field $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->field = $var; - - return $this; - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * 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); - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * 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/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php deleted file mode 100644 index 4f57674f6424..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php +++ /dev/null @@ -1,281 +0,0 @@ -google.firestore.admin.v1.UserCreds - */ -class UserCreds extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $secure_password = ''; - protected $UserCredsIdentity; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the user creds were created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the user creds were last updated. - * @type int $state - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * @type string $secure_password - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $resource_identity - * Resource Identity descriptor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSecurePassword() - { - return $this->secure_password; - } - - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecurePassword($var) - { - GPBUtil::checkString($var, True); - $this->secure_password = $var; - - return $this; - } - - /** - * Resource Identity descriptor. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; - * @return \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity|null - */ - public function getResourceIdentity() - { - return $this->readOneof(6); - } - - public function hasResourceIdentity() - { - return $this->hasOneof(6); - } - - /** - * Resource Identity descriptor. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $var - * @return $this - */ - public function setResourceIdentity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getUserCredsIdentity() - { - return $this->whichOneof("UserCredsIdentity"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php deleted file mode 100644 index 43aae2282b0e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.firestore.admin.v1.UserCreds.ResourceIdentity - */ -class ResourceIdentity extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $principal = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $principal - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPrincipal() - { - return $this->principal; - } - - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkString($var, True); - $this->principal = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php deleted file mode 100644 index 87e4f2a1a39b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.UserCreds.State - */ -class State -{ - /** - * The default value. Should not be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The user creds are enabled. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The user creds are disabled. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php deleted file mode 100644 index 8aa07e17a56a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php +++ /dev/null @@ -1,72 +0,0 @@ -google.firestore.admin.v1.WeeklyRecurrence - */ -class WeeklyRecurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - */ - protected $day = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php deleted file mode 100644 index 22e0d66b5189..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->bulkDeleteDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkDeleteDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - bulk_delete_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php deleted file mode 100644 index 1fb08fa56f99..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php +++ /dev/null @@ -1,125 +0,0 @@ -setDatabase($formattedPitrSnapshotDatabase) - ->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->cloneDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - $formattedPitrSnapshotDatabase = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - clone_database_sample($formattedParent, $databaseId, $formattedPitrSnapshotDatabase); -} -// [END firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php deleted file mode 100644 index 977286655c7b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->createBackupSchedule($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - create_backup_schedule_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php deleted file mode 100644 index 783e18078ae7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - - create_database_sample($formattedParent, $databaseId); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php deleted file mode 100644 index 698c28acb527..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setIndex($index); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - create_index_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php deleted file mode 100644 index 12f15789d40a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->createUserCreds($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - $userCredsId = '[USER_CREDS_ID]'; - - create_user_creds_sample($formattedParent, $userCredsId); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php deleted file mode 100644 index d1d6ca23d9fb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php deleted file mode 100644 index f63397852def..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - delete_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php deleted file mode 100644 index 2c054985cc61..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->deleteDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - delete_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php deleted file mode 100644 index 5100d4af099d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteIndex($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 = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php deleted file mode 100644 index db1dfa9a341d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - delete_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php deleted file mode 100644 index 2b7bb1a05207..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->disableUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - disable_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php deleted file mode 100644 index fff81717a1ec..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->enableUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - enable_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php deleted file mode 100644 index d74212e16a28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->exportDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - export_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php deleted file mode 100644 index fb0043c93703..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $firestoreAdminClient->getBackup($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 = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php deleted file mode 100644 index 42aabad3b2f8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->getBackupSchedule($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 = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - get_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php deleted file mode 100644 index 39e4f8f513b9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Database $response */ - $response = $firestoreAdminClient->getDatabase($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - get_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php deleted file mode 100644 index c85dadbe1eb5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Field $response */ - $response = $firestoreAdminClient->getField($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 = FirestoreAdminClient::fieldName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[FIELD]' - ); - - get_field_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php deleted file mode 100644 index d87b6487a86e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Index $response */ - $response = $firestoreAdminClient->getIndex($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 = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php deleted file mode 100644 index 0921c791681b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->getUserCreds($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - get_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php deleted file mode 100644 index 3bcd34ff43ae..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->importDocuments($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - import_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php deleted file mode 100644 index e5fd7d370287..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupSchedulesResponse $response */ - $response = $firestoreAdminClient->listBackupSchedules($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - list_backup_schedules_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php deleted file mode 100644 index 18a8633f5fa1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupsResponse $response */ - $response = $firestoreAdminClient->listBackups($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 = FirestoreAdminClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backups_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php deleted file mode 100644 index dbfcf54c34a4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListDatabasesResponse $response */ - $response = $firestoreAdminClient->listDatabases($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 = FirestoreAdminClient::projectName('[PROJECT]'); - - list_databases_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php deleted file mode 100644 index e0219706c327..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listFields($request); - - /** @var Field $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_fields_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php deleted file mode 100644 index f3bac598fa14..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listIndexes($request); - - /** @var Index $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 = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_indexes_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php deleted file mode 100644 index 157d102fb508..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListUserCredsResponse $response */ - $response = $firestoreAdminClient->listUserCreds($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 = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - list_user_creds_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php deleted file mode 100644 index cf835144108b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->resetUserPassword($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 = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - reset_user_password_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php deleted file mode 100644 index 98381e2f7c76..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php +++ /dev/null @@ -1,124 +0,0 @@ -setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->restoreDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - $formattedBackup = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - restore_database_sample($formattedParent, $databaseId, $formattedBackup); -} -// [END firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php deleted file mode 100644 index a86c8f7e485f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php +++ /dev/null @@ -1,59 +0,0 @@ -setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->updateBackupSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php deleted file mode 100644 index 075e9e0b9cb2..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php deleted file mode 100644 index ea5c384494ac..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php +++ /dev/null @@ -1,122 +0,0 @@ -setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateField($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Field $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 -{ - $fieldName = '[NAME]'; - - update_field_sample($fieldName); -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php deleted file mode 100644 index 97f6dfe6af15..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php +++ /dev/null @@ -1,1473 +0,0 @@ - bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneDatabaseAsync(CloneDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupScheduleAsync(CreateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatabaseAsync(CreateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUserCredsAsync(CreateUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupScheduleAsync(DeleteBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatabaseAsync(DeleteDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUserCredsAsync(DeleteUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableUserCredsAsync(DisableUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface enableUserCredsAsync(EnableUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDocumentsAsync(ExportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupScheduleAsync(GetBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatabaseAsync(GetDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFieldAsync(GetFieldRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUserCredsAsync(GetUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDocumentsAsync(ImportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupSchedulesAsync(ListBackupSchedulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatabasesAsync(ListDatabasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFieldsAsync(ListFieldsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUserCredsAsync(ListUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetUserPasswordAsync(ResetUserPasswordRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreDatabaseAsync(RestoreDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupScheduleAsync(UpdateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDatabaseAsync(UpdateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFieldAsync(UpdateFieldRequest $request, array $optionalArgs = []) - */ -final class FirestoreAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_schedule resource. - * - * @param string $project - * @param string $database - * @param string $backupSchedule - * - * @return string The formatted backup_schedule resource. - */ - public static function backupScheduleName(string $project, string $database, string $backupSchedule): string - { - return self::getPathTemplate('backupSchedule')->render([ - 'project' => $project, - 'database' => $database, - 'backup_schedule' => $backupSchedule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * collection_group resource. - * - * @param string $project - * @param string $database - * @param string $collection - * - * @return string The formatted collection_group resource. - */ - public static function collectionGroupName(string $project, string $database, string $collection): string - { - return self::getPathTemplate('collectionGroup')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a database - * resource. - * - * @param string $project - * @param string $database - * - * @return string The formatted database resource. - */ - public static function databaseName(string $project, string $database): string - { - return self::getPathTemplate('database')->render([ - 'project' => $project, - 'database' => $database, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a field - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $field - * - * @return string The formatted field resource. - */ - public static function fieldName(string $project, string $database, string $collection, string $field): string - { - return self::getPathTemplate('field')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $project, string $database, string $collection, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a operation - * resource. - * - * @param string $project - * @param string $database - * @param string $operation - * - * @return string The formatted operation resource. - */ - public static function operationName(string $project, string $database, string $operation): string - { - return self::getPathTemplate('operation')->render([ - 'project' => $project, - 'database' => $database, - 'operation' => $operation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a user_creds - * resource. - * - * @param string $project - * @param string $database - * @param string $userCreds - * - * @return string The formatted user_creds resource. - */ - public static function userCredsName(string $project, string $database, string $userCreds): string - { - return self::getPathTemplate('userCreds')->render([ - 'project' => $project, - 'database' => $database, - 'user_creds' => $userCreds, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} - * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} - * - database: projects/{project}/databases/{database} - * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} - * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} - * - location: projects/{project}/locations/{location} - * - operation: projects/{project}/databases/{database}/operations/{operation} - * - project: projects/{project} - * - userCreds: projects/{project}/databases/{database}/userCreds/{user_creds} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'firestore.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Firestore\Admin\V1\FirestoreAdminClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FirestoreAdminClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Bulk deletes a subset of documents from Google Cloud Firestore. - * Documents created or updated after the underlying system starts to process - * the request will not be deleted. The bulk delete occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. - * - * For more details on bulk delete behavior, refer to: - * https://cloud.google.com/firestore/docs/manage-data/bulk-delete - * - * The async variant is {@see FirestoreAdminClient::bulkDeleteDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/bulk_delete_documents.php - * - * @param BulkDeleteDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 bulkDeleteDocuments(BulkDeleteDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BulkDeleteDocuments', $request, $callOptions)->wait(); - } - - /** - * Creates a new database by cloning an existing one. - * - * The new database must be in the same cloud region or multi-region location - * as the existing database. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * database. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the clone, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the clone was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * The async variant is {@see FirestoreAdminClient::cloneDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/clone_database.php - * - * @param CloneDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 cloneDatabase(CloneDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CloneDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a backup schedule on a database. - * At most two backup schedules can be configured on a database, one daily - * backup schedule and one weekly backup schedule. - * - * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_backup_schedule.php - * - * @param CreateBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackupSchedule(CreateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('CreateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Create a database. - * - * The async variant is {@see FirestoreAdminClient::createDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_database.php - * - * @param CreateDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createDatabase(CreateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a composite index. This returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the creation. The metadata for the operation - * will be the type - * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - * - * The async variant is {@see FirestoreAdminClient::createIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_index.php - * - * @param CreateIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); - } - - /** - * Create a user creds. - * - * The async variant is {@see FirestoreAdminClient::createUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_user_creds.php - * - * @param CreateUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUserCreds(CreateUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('CreateUserCreds', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup.php - * - * @param DeleteBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup_schedule.php - * - * @param DeleteBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteBackupSchedule(DeleteBackupScheduleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Deletes a database. - * - * The async variant is {@see FirestoreAdminClient::deleteDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_database.php - * - * @param DeleteDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 deleteDatabase(DeleteDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDatabase', $request, $callOptions)->wait(); - } - - /** - * Deletes a composite index. - * - * The async variant is {@see FirestoreAdminClient::deleteIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_index.php - * - * @param DeleteIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteIndex(DeleteIndexRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); - } - - /** - * Deletes a user creds. - * - * The async variant is {@see FirestoreAdminClient::deleteUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_user_creds.php - * - * @param DeleteUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteUserCreds(DeleteUserCredsRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteUserCreds', $request, $callOptions)->wait(); - } - - /** - * Disables a user creds. No-op if the user creds are already disabled. - * - * The async variant is {@see FirestoreAdminClient::disableUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/disable_user_creds.php - * - * @param DisableUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function disableUserCreds(DisableUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('DisableUserCreds', $request, $callOptions)->wait(); - } - - /** - * Enables a user creds. No-op if the user creds are already enabled. - * - * The async variant is {@see FirestoreAdminClient::enableUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/enable_user_creds.php - * - * @param EnableUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function enableUserCreds(EnableUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('EnableUserCreds', $request, $callOptions)->wait(); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * - * The async variant is {@see FirestoreAdminClient::exportDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/export_documents.php - * - * @param ExportDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 exportDocuments(ExportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportDocuments', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup. - * - * The async variant is {@see FirestoreAdminClient::getBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup.php - * - * @param GetBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::getBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup_schedule.php - * - * @param GetBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupSchedule(GetBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('GetBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Gets information about a database. - * - * The async variant is {@see FirestoreAdminClient::getDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_database.php - * - * @param GetDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Database - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDatabase(GetDatabaseRequest $request, array $callOptions = []): Database - { - return $this->startApiCall('GetDatabase', $request, $callOptions)->wait(); - } - - /** - * Gets the metadata and configuration for a Field. - * - * The async variant is {@see FirestoreAdminClient::getFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_field.php - * - * @param GetFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Field - * - * @throws ApiException Thrown if the API call fails. - */ - public function getField(GetFieldRequest $request, array $callOptions = []): Field - { - return $this->startApiCall('GetField', $request, $callOptions)->wait(); - } - - /** - * Gets a composite index. - * - * The async variant is {@see FirestoreAdminClient::getIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_index.php - * - * @param GetIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Index - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndex(GetIndexRequest $request, array $callOptions = []): Index - { - return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); - } - - /** - * Gets a user creds resource. Note that the returned resource does not - * contain the secret value itself. - * - * The async variant is {@see FirestoreAdminClient::getUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_user_creds.php - * - * @param GetUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUserCreds(GetUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('GetUserCreds', $request, $callOptions)->wait(); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * - * The async variant is {@see FirestoreAdminClient::importDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/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(); - } - - /** - * List backup schedules. - * - * The async variant is {@see FirestoreAdminClient::listBackupSchedulesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backup_schedules.php - * - * @param ListBackupSchedulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListBackupSchedulesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupSchedules(ListBackupSchedulesRequest $request, array $callOptions = []): ListBackupSchedulesResponse - { - return $this->startApiCall('ListBackupSchedules', $request, $callOptions)->wait(); - } - - /** - * Lists all the backups. - * - * The async variant is {@see FirestoreAdminClient::listBackupsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backups.php - * - * @param ListBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListBackupsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): ListBackupsResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions)->wait(); - } - - /** - * List all the databases in the project. - * - * The async variant is {@see FirestoreAdminClient::listDatabasesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_databases.php - * - * @param ListDatabasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListDatabasesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDatabases(ListDatabasesRequest $request, array $callOptions = []): ListDatabasesResponse - { - return $this->startApiCall('ListDatabases', $request, $callOptions)->wait(); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with the filter set to `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * The async variant is {@see FirestoreAdminClient::listFieldsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_fields.php - * - * @param ListFieldsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listFields(ListFieldsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFields', $request, $callOptions); - } - - /** - * Lists composite indexes. - * - * The async variant is {@see FirestoreAdminClient::listIndexesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_indexes.php - * - * @param ListIndexesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexes', $request, $callOptions); - } - - /** - * List all user creds in the database. Note that the returned resource - * does not contain the secret value itself. - * - * The async variant is {@see FirestoreAdminClient::listUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_user_creds.php - * - * @param ListUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListUserCredsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUserCreds(ListUserCredsRequest $request, array $callOptions = []): ListUserCredsResponse - { - return $this->startApiCall('ListUserCreds', $request, $callOptions)->wait(); - } - - /** - * Resets the password of a user creds. - * - * The async variant is {@see FirestoreAdminClient::resetUserPasswordAsync()} . - * - * @example samples/V1/FirestoreAdminClient/reset_user_password.php - * - * @param ResetUserPasswordRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetUserPassword(ResetUserPasswordRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('ResetUserPassword', $request, $callOptions)->wait(); - } - - /** - * Creates a new database by restoring from an existing backup. - * - * The new database must be in the same cloud region or multi-region location - * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * backup. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the restore, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the restore was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * The async variant is {@see FirestoreAdminClient::restoreDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/restore_database.php - * - * @param RestoreDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 restoreDatabase(RestoreDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::updateBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_backup_schedule.php - * - * @param UpdateBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackupSchedule(UpdateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('UpdateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Updates a database. - * - * The async variant is {@see FirestoreAdminClient::updateDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_database.php - * - * @param UpdateDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateDatabase(UpdateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - * should provide a field mask to avoid changing any configuration that the - * caller isn't aware of. The field mask should be specified as: `{ paths: - * "index_config" }`. - * - * This call returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the field update. The metadata for the - * operation will be the type - * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - * The async variant is {@see FirestoreAdminClient::updateFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_field.php - * - * @param UpdateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 updateField(UpdateFieldRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateField', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json deleted file mode 100644 index dbbc7871bacb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.admin.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", - "services": { - "FirestoreAdmin": { - "clients": { - "grpc": { - "libraryClient": "FirestoreAdminGapicClient", - "rpcs": { - "BulkDeleteDocuments": { - "methods": [ - "bulkDeleteDocuments" - ] - }, - "CloneDatabase": { - "methods": [ - "cloneDatabase" - ] - }, - "CreateBackupSchedule": { - "methods": [ - "createBackupSchedule" - ] - }, - "CreateDatabase": { - "methods": [ - "createDatabase" - ] - }, - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "CreateUserCreds": { - "methods": [ - "createUserCreds" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupSchedule": { - "methods": [ - "deleteBackupSchedule" - ] - }, - "DeleteDatabase": { - "methods": [ - "deleteDatabase" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "DeleteUserCreds": { - "methods": [ - "deleteUserCreds" - ] - }, - "DisableUserCreds": { - "methods": [ - "disableUserCreds" - ] - }, - "EnableUserCreds": { - "methods": [ - "enableUserCreds" - ] - }, - "ExportDocuments": { - "methods": [ - "exportDocuments" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupSchedule": { - "methods": [ - "getBackupSchedule" - ] - }, - "GetDatabase": { - "methods": [ - "getDatabase" - ] - }, - "GetField": { - "methods": [ - "getField" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "GetUserCreds": { - "methods": [ - "getUserCreds" - ] - }, - "ImportDocuments": { - "methods": [ - "importDocuments" - ] - }, - "ListBackupSchedules": { - "methods": [ - "listBackupSchedules" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListDatabases": { - "methods": [ - "listDatabases" - ] - }, - "ListFields": { - "methods": [ - "listFields" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "ListUserCreds": { - "methods": [ - "listUserCreds" - ] - }, - "ResetUserPassword": { - "methods": [ - "resetUserPassword" - ] - }, - "RestoreDatabase": { - "methods": [ - "restoreDatabase" - ] - }, - "UpdateBackupSchedule": { - "methods": [ - "updateBackupSchedule" - ] - }, - "UpdateDatabase": { - "methods": [ - "updateDatabase" - ] - }, - "UpdateField": { - "methods": [ - "updateField" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json deleted file mode 100644 index 5cbb0d1c138f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "interfaces": { - "google.firestore.admin.v1.FirestoreAdmin": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BulkDeleteDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CloneDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DisableUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "EnableUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetField": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ImportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBackupSchedules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDatabases": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFields": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResetUserPassword": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RestoreDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateField": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php deleted file mode 100644 index c3127617cb45..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php +++ /dev/null @@ -1,523 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CloneDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CloneDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getPitrSnapshot', - 'getDatabase', - ], - 'matchers' => [], - ], - [ - 'keyName' => 'database_id', - 'fieldAccessors' => [ - 'getPitrSnapshot', - 'getDatabase', - ], - 'matchers' => [], - ], - ], - ], - 'CreateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CreateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\DeleteDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\RestoreDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'database.name', - 'fieldAccessors' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'field.name', - 'fieldAccessors' => [ - 'getField', - 'getName', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DisableUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EnableUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Database', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Field', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Index', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFields', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListUserCredsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResetUserPassword' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'backup_schedule.name', - 'fieldAccessors' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', - 'backupSchedule' => 'projects/{project}/databases/{database}/backupSchedules/{backup_schedule}', - 'collectionGroup' => 'projects/{project}/databases/{database}/collectionGroups/{collection}', - 'database' => 'projects/{project}/databases/{database}', - 'field' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}', - 'index' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}', - 'location' => 'projects/{project}/locations/{location}', - 'operation' => 'projects/{project}/databases/{database}/operations/{operation}', - 'project' => 'projects/{project}', - 'userCreds' => 'projects/{project}/databases/{database}/userCreds/{user_creds}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php deleted file mode 100644 index a2b82a32fc0f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php +++ /dev/null @@ -1,452 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:bulkDeleteDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CloneDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases:clone', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'body' => 'database', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'database_id', - ], - ], - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', - 'body' => 'user_creds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'user_creds_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserCreds' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DisableUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:disable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EnableUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:enable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUserCreds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserCreds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetUserPassword' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases:restore', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'backup_schedule.name' => [ - 'getters' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', - 'body' => 'database', - 'placeholders' => [ - 'database.name' => [ - 'getters' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'body' => 'field', - 'placeholders' => [ - 'field.name' => [ - 'getters' => [ - 'getField', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php deleted file mode 100644 index 158d07508900..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php +++ /dev/null @@ -1,2977 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreAdminClient($options); - } - - /** @test */ - public function bulkDeleteDocumentsTest() - { - $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/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $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 bulkDeleteDocumentsExceptionTest() - { - $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/bulkDeleteDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - 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 cloneDatabaseTest() - { - $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/cloneDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cloneDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $pitrSnapshot = new PitrSnapshot(); - $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $pitrSnapshot->setDatabase($pitrSnapshotDatabase); - $pitrSnapshotSnapshotTime = new Timestamp(); - $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - $response = $gapicClient->cloneDatabase($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.firestore.admin.v1.FirestoreAdmin/CloneDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getPitrSnapshot(); - $this->assertProtobufEquals($pitrSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); - $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 cloneDatabaseExceptionTest() - { - $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/cloneDatabaseTest'); - $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->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $pitrSnapshot = new PitrSnapshot(); - $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $pitrSnapshot->setDatabase($pitrSnapshotDatabase); - $pitrSnapshotSnapshotTime = new Timestamp(); - $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - $response = $gapicClient->cloneDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); - 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 createBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->createBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->createBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDatabaseTest() - { - $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/createDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($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.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - $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 createDatabaseExceptionTest() - { - $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/createDatabaseTest'); - $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->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - 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 createIndexTest() - { - $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/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $multikey = true; - $shardCount = 495377042; - $unique = false; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $expectedResponse->setMultikey($multikey); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUnique($unique); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($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.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $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 createIndexExceptionTest() - { - $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/createIndexTest'); - $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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - 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 createUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $userCreds = new UserCreds(); - $userCredsId = 'userCredsId1873704105'; - $request = (new CreateUserCredsRequest()) - ->setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - $response = $gapicClient->createUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserCreds(); - $this->assertProtobufEquals($userCreds, $actualValue); - $actualValue = $actualRequestObject->getUserCredsId(); - $this->assertProtobufEquals($userCredsId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->databaseName('[PROJECT]', '[DATABASE]'); - $userCreds = new UserCreds(); - $userCredsId = 'userCredsId1873704105'; - $request = (new CreateUserCredsRequest()) - ->setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - try { - $gapicClient->createUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $gapicClient->deleteBackup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - $gapicClient->deleteBackupSchedule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDatabaseTest() - { - $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/deleteDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($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.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - $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 deleteDatabaseExceptionTest() - { - $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/deleteDatabaseTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - 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 deleteIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $gapicClient->deleteIndex($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteIndex($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DeleteUserCredsRequest()) - ->setName($formattedName); - $gapicClient->deleteUserCreds($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DeleteUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DisableUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->disableUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DisableUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->disableUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enableUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new EnableUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->enableUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enableUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new EnableUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->enableUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDocumentsTest() - { - $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/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUriPrefix2 = 'outputUriPrefix2-377757258'; - $expectedResponse = new ExportDocumentsResponse(); - $expectedResponse->setOutputUriPrefix($outputUriPrefix2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($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.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - $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 exportDocumentsExceptionTest() - { - $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/exportDocumentsTest'); - $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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $databaseUid = 'databaseUid-458567796'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDatabaseUid($databaseUid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getDatabase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getDatabase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Field(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - $response = $gapicClient->getField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - try { - $gapicClient->getField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $multikey = true; - $shardCount = 495377042; - $unique = false; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $expectedResponse->setMultikey($multikey); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUnique($unique); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndex($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndex($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new GetUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->getUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new GetUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->getUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 GPBEmpty(); - $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 - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $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.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $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 - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $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 listBackupSchedulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupSchedulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupSchedules($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupSchedulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupSchedules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDatabasesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDatabasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDatabases($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->projectName('[PROJECT]'); - $request = (new ListDatabasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDatabases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fieldsElement = new Field(); - $fields = [ - $fieldsElement, - ]; - $expectedResponse = new ListFieldsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFields($fields); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFields($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFields($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListUserCredsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListUserCredsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListUserCredsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetUserPasswordTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new ResetUserPasswordRequest()) - ->setName($formattedName); - $response = $gapicClient->resetUserPassword($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetUserPasswordExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new ResetUserPasswordRequest()) - ->setName($formattedName); - try { - $gapicClient->resetUserPassword($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreDatabaseTest() - { - $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/restoreDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($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.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($formattedBackup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - $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 restoreDatabaseExceptionTest() - { - $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/restoreDatabaseTest'); - $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->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - 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 updateBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->updateBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->updateBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDatabaseTest() - { - $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/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($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.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - $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 updateDatabaseExceptionTest() - { - $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/updateDatabaseTest'); - $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 - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - 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 updateFieldTest() - { - $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/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Field(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFieldTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($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.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getField(); - $this->assertProtobufEquals($field, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - $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 updateFieldExceptionTest() - { - $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/updateFieldTest'); - $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 - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - 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 bulkDeleteDocumentsAsyncTest() - { - $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/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocumentsAsync($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.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $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/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php deleted file mode 100644 index b1b788bc4187..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDD\x03\x0A,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\"\xBE\x01\x0A\x11AggregationResult\x12U\x0A\x10aggregate_fields\x18\x02 \x03(\x0B2;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1AR\x0A\x14AggregateFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xCE\x01\x0A\x17com.google.firestore.v1B\x16AggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php deleted file mode 100644 index a7f1ca1fe6ef..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x93\x03\x0A&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\x0A\x0BBitSequence\x12\x0E\x0A\x06bitmap\x18\x01 \x01(\x0C\x12\x0F\x0A\x07padding\x18\x02 \x01(\x05\"Q\x0A\x0BBloomFilter\x12.\x0A\x04bits\x18\x01 \x01(\x0B2 .google.firestore.v1.BitSequence\x12\x12\x0A\x0Ahash_count\x18\x02 \x01(\x05B\xC8\x01\x0A\x17com.google.firestore.v1B\x10BloomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php deleted file mode 100644 index 7e8aea52f92e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBD\x05\x0A google/firestore/v1/common.proto\x12\x13google.firestore.v1\"#\x0A\x0CDocumentMask\x12\x13\x0A\x0Bfield_paths\x18\x01 \x03(\x09\"e\x0A\x0CPrecondition\x12\x10\x0A\x06exists\x18\x01 \x01(\x08H\x00\x121\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x10\x0A\x0Econdition_type\"\xA9\x02\x0A\x12TransactionOptions\x12E\x0A\x09read_only\x18\x02 \x01(\x0B20.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\x0A\x0Aread_write\x18\x03 \x01(\x0B21.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1A&\x0A\x09ReadWrite\x12\x19\x0A\x11retry_transaction\x18\x01 \x01(\x0C\x1AS\x0A\x08ReadOnly\x12/\x0A\x09read_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selectorB\x06\x0A\x04modeB\xC3\x01\x0A\x17com.google.firestore.v1B\x0BCommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php deleted file mode 100644 index 64e7b3cca1d6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9E\x0F\x0A\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x18google/type/latlng.proto\"\x80\x02\x0A\x08Document\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x129\x0A\x06fields\x18\x02 \x03(\x0B2).google.firestore.v1.Document.FieldsEntry\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xE5\x04\x0A\x05Value\x120\x0A\x0Anull_value\x18\x0B \x01(\x0E2\x1A.google.protobuf.NullValueH\x00\x12\x17\x0A\x0Dboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\x0A\x0Cdouble_value\x18\x03 \x01(\x01H\x00\x125\x0A\x0Ftimestamp_value\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x16\x0A\x0Cstring_value\x18\x11 \x01(\x09H\x00\x12\x15\x0A\x0Bbytes_value\x18\x12 \x01(\x0CH\x00\x12\x19\x0A\x0Freference_value\x18\x05 \x01(\x09H\x00\x12.\x0A\x0Fgeo_point_value\x18\x08 \x01(\x0B2\x13.google.type.LatLngH\x00\x126\x0A\x0Barray_value\x18\x09 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x122\x0A\x09map_value\x18\x06 \x01(\x0B2\x1D.google.firestore.v1.MapValueH\x00\x12\x1F\x0A\x15field_reference_value\x18\x13 \x01(\x09H\x00\x12\"\x0A\x18variable_reference_value\x18\x16 \x01(\x09H\x00\x127\x0A\x0Efunction_value\x18\x14 \x01(\x0B2\x1D.google.firestore.v1.FunctionH\x00\x127\x0A\x0Epipeline_value\x18\x15 \x01(\x0B2\x1D.google.firestore.v1.PipelineH\x00B\x0C\x0A\x0Avalue_type\"8\x0A\x0AArrayValue\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\"\x90\x01\x0A\x08MapValue\x129\x0A\x06fields\x18\x01 \x03(\x0B2).google.firestore.v1.MapValue.FieldsEntry\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xDA\x01\x0A\x08Function\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12@\x0A\x07options\x18\x03 \x03(\x0B2*.google.firestore.v1.Function.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xA4\x02\x0A\x08Pipeline\x128\x0A\x06stages\x18\x01 \x03(\x0B2#.google.firestore.v1.Pipeline.StageB\x03\xE0A\x02\x1A\xDD\x01\x0A\x05Stage\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12F\x0A\x07options\x18\x03 \x03(\x0B20.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php deleted file mode 100644 index bd54bc8f349b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBF\x02\x0A'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\"2\x0A\x0CExplainStats\x12\"\x0A\x04data\x18\x01 \x01(\x0B2\x14.google.protobuf.AnyB\xC2\x01\x0A\x17com.google.firestore.v1B\x11ExplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php deleted file mode 100644 index d18d15619ddc..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCFT\x0A#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x18google/api/routing.proto\x1A,google/firestore/v1/aggregation_result.proto\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A'google/firestore/v1/explain_stats.proto\x1A\"google/firestore/v1/pipeline.proto\x1A\x1Fgoogle/firestore/v1/query.proto\x1A'google/firestore/v1/query_profile.proto\x1A\x1Fgoogle/firestore/v1/write.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xB8\x01\x0A\x12GetDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x03 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xBB\x02\x0A\x14ListDocumentsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x06 \x01(\x09B\x03\xE0A\x01\x124\x0A\x04mask\x18\x07 \x01(\x0B2!.google.firestore.v1.DocumentMaskB\x03\xE0A\x01\x12\x15\x0A\x0Btransaction\x18\x08 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x14\x0A\x0Cshow_missing\x18\x0C \x01(\x08B\x16\x0A\x14consistency_selector\"b\x0A\x15ListDocumentsResponse\x120\x0A\x09documents\x18\x01 \x03(\x0B2\x1D.google.firestore.v1.Document\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC4\x01\x0A\x15CreateDocumentRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdocument_id\x18\x03 \x01(\x09\x124\x0A\x08document\x18\x04 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x12/\x0A\x04mask\x18\x05 \x01(\x0B2!.google.firestore.v1.DocumentMask\"\xF3\x01\x0A\x15UpdateDocumentRequest\x124\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x126\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.Precondition\"g\x0A\x15DeleteDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x10current_document\x18\x02 \x01(\x0B2!.google.firestore.v1.Precondition\"\x99\x02\x0A\x18BatchGetDocumentsRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x00\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x00\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xAC\x01\x0A\x19BatchGetDocumentsResponse\x12.\x0A\x05found\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x11\x0A\x07missing\x18\x02 \x01(\x09H\x00\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x08\x0A\x06result\"j\x0A\x17BeginTransactionRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x07options\x18\x02 \x01(\x0B2'.google.firestore.v1.TransactionOptions\"/\x0A\x18BeginTransactionResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\"g\x0A\x0DCommitRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\"z\x0A\x0ECommitResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"B\x0A\x0FRollbackRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Btransaction\x18\x02 \x01(\x0CB\x03\xE0A\x02\"\xDD\x02\x0A\x0FRunQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\x87\x02\x0A\x10RunQueryResponse\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x17\x0A\x0Fskipped_results\x18\x04 \x01(\x05\x12\x0E\x0A\x04done\x18\x06 \x01(\x08H\x00\x12<\x0A\x0Fexplain_metrics\x18\x0B \x01(\x0B2#.google.firestore.v1.ExplainMetricsB\x17\x0A\x15continuation_selector\"\xAC\x02\x0A\x16ExecutePipelineRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12F\x0A\x13structured_pipeline\x18\x02 \x01(\x0B2'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0F\x0A\x0Dpipeline_typeB\x16\x0A\x14consistency_selector\"\xCC\x01\x0A\x17ExecutePipelineResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\x12.\x0A\x07results\x18\x02 \x03(\x0B2\x1D.google.firestore.v1.Document\x122\x0A\x0Eexecution_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x128\x0A\x0Dexplain_stats\x18\x04 \x01(\x0B2!.google.firestore.v1.ExplainStats\"\xFF\x02\x0A\x1ARunAggregationQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x1Cstructured_aggregation_query\x18\x02 \x01(\x0B2/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x08 \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\xD7\x01\x0A\x1BRunAggregationQueryResponse\x126\x0A\x06result\x18\x01 \x01(\x0B2&.google.firestore.v1.AggregationResult\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12<\x0A\x0Fexplain_metrics\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainMetrics\"\x85\x02\x0A\x15PartitionQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x17\x0A\x0Fpartition_count\x18\x03 \x01(\x03\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"b\x0A\x16PartitionQueryResponse\x12/\x0A\x0Apartitions\x18\x01 \x03(\x0B2\x1B.google.firestore.v1.Cursor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xE8\x01\x0A\x0CWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09stream_id\x18\x02 \x01(\x09\x12*\x0A\x06writes\x18\x03 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x14\x0A\x0Cstream_token\x18\x04 \x01(\x0C\x12=\x0A\x06labels\x18\x05 \x03(\x0B2-.google.firestore.v1.WriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA2\x01\x0A\x0DWriteResponse\x12\x11\x0A\x09stream_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cstream_token\x18\x02 \x01(\x0C\x127\x0A\x0Dwrite_results\x18\x03 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xF2\x01\x0A\x0DListenRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x121\x0A\x0Aadd_target\x18\x02 \x01(\x0B2\x1B.google.firestore.v1.TargetH\x00\x12\x17\x0A\x0Dremove_target\x18\x03 \x01(\x05H\x00\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.firestore.v1.ListenRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x0F\x0A\x0Dtarget_change\"\xD5\x02\x0A\x0EListenResponse\x12:\x0A\x0Dtarget_change\x18\x02 \x01(\x0B2!.google.firestore.v1.TargetChangeH\x00\x12>\x0A\x0Fdocument_change\x18\x03 \x01(\x0B2#.google.firestore.v1.DocumentChangeH\x00\x12>\x0A\x0Fdocument_delete\x18\x04 \x01(\x0B2#.google.firestore.v1.DocumentDeleteH\x00\x12>\x0A\x0Fdocument_remove\x18\x06 \x01(\x0B2#.google.firestore.v1.DocumentRemoveH\x00\x126\x0A\x06filter\x18\x05 \x01(\x0B2\$.google.firestore.v1.ExistenceFilterH\x00B\x0F\x0A\x0Dresponse_type\"\xD6\x03\x0A\x06Target\x128\x0A\x05query\x18\x02 \x01(\x0B2'.google.firestore.v1.Target.QueryTargetH\x00\x12@\x0A\x09documents\x18\x03 \x01(\x0B2+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\x0A\x0Cresume_token\x18\x04 \x01(\x0CH\x01\x12/\x0A\x09read_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12\x11\x0A\x09target_id\x18\x05 \x01(\x05\x12\x0C\x0A\x04once\x18\x06 \x01(\x08\x123\x0A\x0Eexpected_count\x18\x0C \x01(\x0B2\x1B.google.protobuf.Int32Value\x1A\$\x0A\x0FDocumentsTarget\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x1Am\x0A\x0BQueryTarget\x12\x0E\x0A\x06parent\x18\x01 \x01(\x09\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00B\x0C\x0A\x0Aquery_typeB\x0D\x0A\x0Btarget_typeB\x0D\x0A\x0Bresume_type\"\xAA\x02\x0A\x0CTargetChange\x12N\x0A\x12target_change_type\x18\x01 \x01(\x0E22.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\x0A\x0Atarget_ids\x18\x02 \x03(\x05\x12!\x0A\x05cause\x18\x03 \x01(\x0B2\x12.google.rpc.Status\x12\x14\x0A\x0Cresume_token\x18\x04 \x01(\x0C\x12-\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\"N\x0A\x10TargetChangeType\x12\x0D\x0A\x09NO_CHANGE\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0B\x0A\x07CURRENT\x10\x03\x12\x09\x0A\x05RESET\x10\x04\"\x9F\x01\x0A\x18ListCollectionIdsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12/\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"L\x0A\x19ListCollectionIdsResponse\x12\x16\x0A\x0Ecollection_ids\x18\x01 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC9\x01\x0A\x11BatchWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12B\x0A\x06labels\x18\x03 \x03(\x0B22.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"q\x0A\x12BatchWriteResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12\"\x0A\x06status\x18\x02 \x03(\x0B2\x12.google.rpc.Status2\xFB\x1B\x0A\x09Firestore\x12\x8F\x01\x0A\x0BGetDocument\x12'.google.firestore.v1.GetDocumentRequest\x1A\x1D.google.firestore.v1.Document\"8\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/databases/*/documents/*/**}\x12\xF5\x01\x0A\x0DListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1A*.google.firestore.v1.ListDocumentsResponse\"\x8C\x01\x82\xD3\xE4\x93\x02\x85\x01\x12B/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xBF\x01\x0A\x0EUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1A\x1D.google.firestore.v1.Document\"b\xDAA\x14document,update_mask\x82\xD3\xE4\x93\x02E29/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08document\x12\x95\x01\x0A\x0EDeleteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xB9\x01\x0A\x11BatchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1A..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xC7\x01\x0A\x10BeginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1A-.google.firestore.v1.BeginTransactionResponse\"V\xDAA\x08database\x82\xD3\xE4\x93\x02E\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xA6\x01\x0A\x06Commit\x12\".google.firestore.v1.CommitRequest\x1A#.google.firestore.v1.CommitResponse\"S\xDAA\x0Fdatabase,writes\x82\xD3\xE4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xA4\x01\x0A\x08Rollback\x12\$.google.firestore.v1.RollbackRequest\x1A\x16.google.protobuf.Empty\"Z\xDAA\x14database,transaction\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xDF\x01\x0A\x08RunQuery\x12\$.google.firestore.v1.RunQueryRequest\x1A%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xD3\xE4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9E\x02\x0A\x0FExecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1A,.google.firestore.v1.ExecutePipelineResponse\"\xAD\x01\x82\xD3\xE4\x93\x02D\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8A\xD3\xE4\x93\x02]\x12&\x0A\x08database\x12\x1Aprojects/{project_id=*}/**\x123\x0A\x08database\x12'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\x0A\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1A0.google.firestore.v1.RunAggregationQueryResponse\"\x9A\x01\x82\xD3\xE4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xFC\x01\x0A\x0EPartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1A+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xD3\xE4\x93\x02\x89\x01\"internalAddGeneratedFile( - "\x0A\x92\x04\x0A\"google/firestore/v1/pipeline.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\"\xE2\x01\x0A\x12StructuredPipeline\x124\x0A\x08pipeline\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.PipelineB\x03\xE0A\x02\x12J\x0A\x07options\x18\x02 \x03(\x0B24.google.firestore.v1.StructuredPipeline.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DPipelineProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php deleted file mode 100644 index 7b9b9c57d1aa..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC3\x1C\x0A\x1Fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\x1A\x1Egoogle/protobuf/wrappers.proto\"\xF8\x13\x0A\x0FStructuredQuery\x12?\x0A\x06select\x18\x01 \x01(\x0B2/.google.firestore.v1.StructuredQuery.Projection\x12E\x0A\x04from\x18\x02 \x03(\x0B27.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\x0A\x05where\x18\x03 \x01(\x0B2+.google.firestore.v1.StructuredQuery.Filter\x12<\x0A\x08order_by\x18\x04 \x03(\x0B2*.google.firestore.v1.StructuredQuery.Order\x12-\x0A\x08start_at\x18\x07 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12+\x0A\x06end_at\x18\x08 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12\x0E\x0A\x06offset\x18\x06 \x01(\x05\x12*\x0A\x05limit\x18\x05 \x01(\x0B2\x1B.google.protobuf.Int32Value\x12K\x0A\x0Cfind_nearest\x18\x09 \x01(\x0B20.google.firestore.v1.StructuredQuery.FindNearestB\x03\xE0A\x01\x1AD\x0A\x12CollectionSelector\x12\x15\x0A\x0Dcollection_id\x18\x02 \x01(\x09\x12\x17\x0A\x0Fall_descendants\x18\x03 \x01(\x08\x1A\xFD\x01\x0A\x06Filter\x12P\x0A\x10composite_filter\x18\x01 \x01(\x0B24.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\x0A\x0Cfield_filter\x18\x02 \x01(\x0B20.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\x0A\x0Cunary_filter\x18\x03 \x01(\x0B20.google.firestore.v1.StructuredQuery.UnaryFilterH\x00B\x0D\x0A\x0Bfilter_type\x1A\xD1\x01\x0A\x0FCompositeFilter\x12I\x0A\x02op\x18\x01 \x01(\x0E2=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\x0A\x07filters\x18\x02 \x03(\x0B2+.google.firestore.v1.StructuredQuery.Filter\"5\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\x0A\x03AND\x10\x01\x12\x06\x0A\x02OR\x10\x02\x1A\x98\x03\x0A\x0BFieldFilter\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12E\x0A\x02op\x18\x02 \x01(\x0E29.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\x0A\x05value\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.Value\"\xD2\x01\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LESS_THAN\x10\x01\x12\x16\x0A\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\x0A\x0CGREATER_THAN\x10\x03\x12\x19\x0A\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\x09\x0A\x05EQUAL\x10\x05\x12\x0D\x0A\x09NOT_EQUAL\x10\x06\x12\x12\x0A\x0EARRAY_CONTAINS\x10\x07\x12\x06\x0A\x02IN\x10\x08\x12\x16\x0A\x12ARRAY_CONTAINS_ANY\x10\x09\x12\x0A\x0A\x06NOT_IN\x10\x0A\x1A\x8A\x02\x0A\x0BUnaryFilter\x12E\x0A\x02op\x18\x01 \x01(\x0E29.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12D\x0A\x05field\x18\x02 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06IS_NAN\x10\x02\x12\x0B\x0A\x07IS_NULL\x10\x03\x12\x0E\x0A\x0AIS_NOT_NAN\x10\x04\x12\x0F\x0A\x0BIS_NOT_NULL\x10\x05B\x0E\x0A\x0Coperand_type\x1A\x8E\x01\x0A\x05Order\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12A\x0A\x09direction\x18\x02 \x01(\x0E2..google.firestore.v1.StructuredQuery.Direction\x1A\$\x0A\x0EFieldReference\x12\x12\x0A\x0Afield_path\x18\x02 \x01(\x09\x1AQ\x0A\x0AProjection\x12C\x0A\x06fields\x18\x02 \x03(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1A\xEA\x03\x0A\x0BFindNearest\x12N\x0A\x0Cvector_field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x03\xE0A\x02\x125\x0A\x0Cquery_vector\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x02\x12_\x0A\x10distance_measure\x18\x03 \x01(\x0E2@.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasureB\x03\xE0A\x02\x12/\x0A\x05limit\x18\x04 \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x02\x12\"\x0A\x15distance_result_field\x18\x05 \x01(\x09B\x03\xE0A\x01\x12=\x0A\x12distance_threshold\x18\x06 \x01(\x0B2\x1C.google.protobuf.DoubleValueB\x03\xE0A\x01\"_\x0A\x0FDistanceMeasure\x12 \x0A\x1CDISTANCE_MEASURE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09EUCLIDEAN\x10\x01\x12\x0A\x0A\x06COSINE\x10\x02\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x03\"E\x0A\x09Direction\x12\x19\x0A\x15DIRECTION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"\xB8\x05\x0A\x1AStructuredAggregationQuery\x12@\x0A\x10structured_query\x18\x01 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12V\x0A\x0Caggregations\x18\x03 \x03(\x0B2;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x03\xE0A\x01\x1A\xF1\x03\x0A\x0BAggregation\x12R\x0A\x05count\x18\x01 \x01(\x0B2A.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\x0A\x03sum\x18\x02 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\x0A\x03avg\x18\x03 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x12\x0A\x05alias\x18\x07 \x01(\x09B\x03\xE0A\x01\x1A8\x0A\x05Count\x12/\x0A\x05up_to\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x1AI\x0A\x03Sum\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1AI\x0A\x03Avg\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x0A\x0A\x08operatorB\x0C\x0A\x0Aquery_type\"D\x0A\x06Cursor\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\x12\x0E\x0A\x06before\x18\x02 \x01(\x08B\xC2\x01\x0A\x17com.google.firestore.v1B\x0AQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php deleted file mode 100644 index 76b015b86594..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEA\x05\x0A'google/firestore/v1/query_profile.proto\x12\x13google.firestore.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\"&\x0A\x0EExplainOptions\x12\x14\x0A\x07analyze\x18\x01 \x01(\x08B\x03\xE0A\x01\"\x86\x01\x0A\x0EExplainMetrics\x126\x0A\x0Cplan_summary\x18\x01 \x01(\x0B2 .google.firestore.v1.PlanSummary\x12<\x0A\x0Fexecution_stats\x18\x02 \x01(\x0B2#.google.firestore.v1.ExecutionStats\"<\x0A\x0BPlanSummary\x12-\x0A\x0Cindexes_used\x18\x01 \x03(\x0B2\x17.google.protobuf.Struct\"\xA8\x01\x0A\x0EExecutionStats\x12\x18\x0A\x10results_returned\x18\x01 \x01(\x03\x125\x0A\x12execution_duration\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12\x17\x0A\x0Fread_operations\x18\x04 \x01(\x03\x12,\x0A\x0Bdebug_stats\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\xC9\x01\x0A\x17com.google.firestore.v1B\x11QueryProfileProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php deleted file mode 100644 index d8c00fd19204..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE8\x0E\x0A\x1Fgoogle/firestore/v1/write.proto\x12\x13google.firestore.v1\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x05Write\x12/\x0A\x06update\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x10\x0A\x06delete\x18\x02 \x01(\x09H\x00\x12;\x0A\x09transform\x18\x06 \x01(\x0B2&.google.firestore.v1.DocumentTransformH\x00\x126\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12P\x0A\x11update_transforms\x18\x07 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.PreconditionB\x0B\x0A\x09operation\"\xE5\x04\x0A\x11DocumentTransform\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12O\x0A\x10field_transforms\x18\x02 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x1A\xEC\x03\x0A\x0EFieldTransform\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12`\x0A\x13set_to_server_value\x18\x02 \x01(\x0E2A.google.firestore.v1.DocumentTransform.FieldTransform.ServerValueH\x00\x12/\x0A\x09increment\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07maximum\x18\x04 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07minimum\x18\x05 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12B\x0A\x17append_missing_elements\x18\x06 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x12@\x0A\x15remove_all_from_array\x18\x07 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\"=\x0A\x0BServerValue\x12\x1C\x0A\x18SERVER_VALUE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CREQUEST_TIME\x10\x01B\x10\x0A\x0Etransform_type\"u\x0A\x0BWriteResult\x12/\x0A\x0Bupdate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x11transform_results\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Value\"q\x0A\x0EDocumentChange\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12\x12\x0A\x0Atarget_ids\x18\x05 \x03(\x05\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\"m\x0A\x0EDocumentDelete\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"m\x0A\x0EDocumentRemove\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x02 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"n\x0A\x0FExistenceFilter\x12\x11\x0A\x09target_id\x18\x01 \x01(\x05\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x129\x0A\x0Funchanged_names\x18\x03 \x01(\x0B2 .google.firestore.v1.BloomFilterB\xC2\x01\x0A\x17com.google.firestore.v1B\x0AWriteProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php deleted file mode 100644 index f7296b1c7d2e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.AggregationResult - */ -class AggregationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - */ - private $aggregate_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); - parent::__construct($data); - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAggregateFields() - { - return $this->aggregate_fields; - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAggregateFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->aggregate_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php deleted file mode 100644 index 8d770c6e90db..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.ArrayValue - */ -class ArrayValue extends \Google\Protobuf\Internal\Message -{ - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Value[] $values - * Values in the array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getValues() - { - return $this->values; - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php deleted file mode 100644 index 0b845bb3b850..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.firestore.v1.BatchGetDocumentsRequest - */ -class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param string[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php deleted file mode 100644 index 15ebf121f41b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php +++ /dev/null @@ -1,214 +0,0 @@ -google.firestore.v1.BatchGetDocumentsResponse - */ -class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $found - * A document that was requested. - * @type string $missing - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type string $transaction - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getFound() - { - return $this->readOneof(1); - } - - public function hasFound() - { - return $this->hasOneof(1); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setFound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @return string - */ - public function getMissing() - { - return $this->readOneof(2); - } - - public function hasMissing() - { - return $this->hasOneof(2); - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @param string $var - * @return $this - */ - public function setMissing($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php deleted file mode 100644 index 1e475fa0e39f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.firestore.v1.BatchWriteRequest - */ -class BatchWriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this batch write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php deleted file mode 100644 index b2da372d7a45..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.v1.BatchWriteResponse - */ -class BatchWriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - */ - private $status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Rpc\Status[] $status - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @return RepeatedField<\Google\Rpc\Status> - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @param \Google\Rpc\Status[] $var - * @return $this - */ - public function setStatus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->status = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php deleted file mode 100644 index ff5dc33718d1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.BeginTransactionRequest - */ -class BeginTransactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - */ - protected $options = null; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * @return \Google\Cloud\Firestore\V1\BeginTransactionRequest - * - * @experimental - */ - public static function build(string $database): self - { - return (new self()) - ->setDatabase($database); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getOptions() - { - return $this->options; - } - - public function hasOptions() - { - return isset($this->options); - } - - public function clearOptions() - { - unset($this->options); - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php deleted file mode 100644 index f790bd672f01..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.v1.BeginTransactionResponse - */ -class BeginTransactionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php deleted file mode 100644 index 296bfb4a577f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php +++ /dev/null @@ -1,124 +0,0 @@ -google.firestore.v1.BitSequence - */ -class BitSequence extends \Google\Protobuf\Internal\Message -{ - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - */ - protected $bitmap = ''; - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - */ - protected $padding = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bitmap - * The bytes that encode the bit sequence. - * May have a length of zero. - * @type int $padding - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @return string - */ - public function getBitmap() - { - return $this->bitmap; - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @param string $var - * @return $this - */ - public function setBitmap($var) - { - GPBUtil::checkString($var, False); - $this->bitmap = $var; - - return $this; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @return int - */ - public function getPadding() - { - return $this->padding; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @param int $var - * @return $this - */ - public function setPadding($var) - { - GPBUtil::checkInt32($var); - $this->padding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php deleted file mode 100644 index 2760f1c7e40a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,119 +0,0 @@ -google.firestore.v1.BloomFilter - */ -class BloomFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - */ - protected $bits = null; - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - */ - protected $hash_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\BitSequence $bits - * The bloom filter data. - * @type int $hash_count - * The number of hashes used by the algorithm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @return \Google\Cloud\Firestore\V1\BitSequence|null - */ - public function getBits() - { - return $this->bits; - } - - public function hasBits() - { - return isset($this->bits); - } - - public function clearBits() - { - unset($this->bits); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @param \Google\Cloud\Firestore\V1\BitSequence $var - * @return $this - */ - public function setBits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BitSequence::class); - $this->bits = $var; - - return $this; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @return int - */ - public function getHashCount() - { - return $this->hash_count; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @param int $var - * @return $this - */ - public function setHashCount($var) - { - GPBUtil::checkInt32($var); - $this->hash_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php deleted file mode 100644 index 28a7f5186283..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.firestore.v1.CommitRequest - */ -class CommitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param \Google\Cloud\Firestore\V1\Write[] $writes The writes to apply. - * - * Always executed atomically and in order. - * - * @return \Google\Cloud\Firestore\V1\CommitRequest - * - * @experimental - */ - public static function build(string $database, array $writes): self - { - return (new self()) - ->setDatabase($database) - ->setWrites($writes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Always executed atomically and in order. - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php deleted file mode 100644 index 9132548afe22..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php +++ /dev/null @@ -1,123 +0,0 @@ -google.firestore.v1.CommitResponse - */ -class CommitResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php deleted file mode 100644 index 7f77953b9837..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php +++ /dev/null @@ -1,248 +0,0 @@ -google.firestore.v1.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - */ - protected $document_id = ''; - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - */ - protected $mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @type string $collection_id - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * @type string $document_id - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The document to create. `name` must not be set. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\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 create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php deleted file mode 100644 index fdf744e2c0e3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.Cursor - */ -class Cursor extends \Google\Protobuf\Internal\Message -{ - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - */ - protected $before = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Value[] $values - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * @type bool $before - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getValues() - { - return $this->values; - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @return bool - */ - public function getBefore() - { - return $this->before; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @param bool $var - * @return $this - */ - public function setBefore($var) - { - GPBUtil::checkBool($var); - $this->before = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php deleted file mode 100644 index a77ac38f9721..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - */ - protected $current_document = null; - - /** - * @param string $name Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * @return \Google\Cloud\Firestore\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. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php deleted file mode 100644 index f858f1fe4e34..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php +++ /dev/null @@ -1,290 +0,0 @@ -google.firestore.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - */ - private $fields; - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type array|\Google\Protobuf\Internal\MapField $fields - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php deleted file mode 100644 index 4d89e75f035e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php +++ /dev/null @@ -1,154 +0,0 @@ -google.firestore.v1.DocumentChange - */ -class DocumentChange extends \Google\Protobuf\Internal\Message -{ - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - */ - private $target_ids; - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * @type int[] $target_ids - * A set of target IDs of targets that match this document. - * @type int[] $removed_target_ids - * A set of target IDs for targets that no longer match this document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @return RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @param int[] $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php deleted file mode 100644 index 706a0f731675..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.v1.DocumentDelete - */ -class DocumentDelete extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * @type int[] $removed_target_ids - * A set of target IDs for targets that previously matched this entity. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php deleted file mode 100644 index 9f4e56639765..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php +++ /dev/null @@ -1,80 +0,0 @@ -google.firestore.v1.DocumentMask - */ -class DocumentMask extends \Google\Protobuf\Internal\Message -{ - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - */ - private $field_paths; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $field_paths - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @return RepeatedField - */ - public function getFieldPaths() - { - return $this->field_paths; - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @param string[] $var - * @return $this - */ - public function setFieldPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_paths = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php deleted file mode 100644 index e346028118e7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php +++ /dev/null @@ -1,160 +0,0 @@ -google.firestore.v1.DocumentRemove - */ -class DocumentRemove extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - */ - private $removed_target_ids; - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * @type int[] $removed_target_ids - * A set of target IDs for targets that previously matched this document. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php deleted file mode 100644 index d57bdf03c859..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.DocumentTransform - */ -class DocumentTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - */ - private $field_transforms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The name of the document to transform. - * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $field_transforms - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> - */ - public function getFieldTransforms() - { - return $this->field_transforms; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var - * @return $this - */ - public function setFieldTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->field_transforms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php deleted file mode 100644 index 10135fb11738..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php +++ /dev/null @@ -1,414 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform - */ -class FieldTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $transform_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * @type int $set_to_server_value - * Sets the field to the given server value. - * @type \Google\Cloud\Firestore\V1\Value $increment - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * @type \Google\Cloud\Firestore\V1\Value $maximum - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\Value $minimum - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @return int - */ - public function getSetToServerValue() - { - return $this->readOneof(2); - } - - public function hasSetToServerValue() - { - return $this->hasOneof(2); - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @param int $var - * @return $this - */ - public function setSetToServerValue($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getIncrement() - { - return $this->readOneof(3); - } - - public function hasIncrement() - { - return $this->hasOneof(3); - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setIncrement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMaximum() - { - return $this->readOneof(4); - } - - public function hasMaximum() - { - return $this->hasOneof(4); - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMaximum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMinimum() - { - return $this->readOneof(5); - } - - public function hasMinimum() - { - return $this->hasOneof(5); - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMinimum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getAppendMissingElements() - { - return $this->readOneof(6); - } - - public function hasAppendMissingElements() - { - return $this->hasOneof(6); - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setAppendMissingElements($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getRemoveAllFromArray() - { - return $this->readOneof(7); - } - - public function hasRemoveAllFromArray() - { - return $this->hasOneof(7); - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setRemoveAllFromArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformType() - { - return $this->whichOneof("transform_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php deleted file mode 100644 index 32444539ac62..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php +++ /dev/null @@ -1,56 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform.ServerValue - */ -class ServerValue -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; - */ - const SERVER_VALUE_UNSPECIFIED = 0; - /** - * The time at which the server processed the request, with millisecond - * precision. If used on multiple fields (same or different documents) in - * a transaction, all the fields will get the same server timestamp. - * - * Generated from protobuf enum REQUEST_TIME = 1; - */ - const REQUEST_TIME = 1; - - private static $valueToName = [ - self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', - self::REQUEST_TIME => 'REQUEST_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php deleted file mode 100644 index 10221d2cba4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.firestore.v1.ExecutePipelineRequest - */ -class ExecutePipelineRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - protected $pipeline_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * @type \Google\Cloud\Firestore\V1\StructuredPipeline $structured_pipeline - * A pipelined operation. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A pipelined operation. - * - * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; - * @return \Google\Cloud\Firestore\V1\StructuredPipeline|null - */ - public function getStructuredPipeline() - { - return $this->readOneof(2); - } - - public function hasStructuredPipeline() - { - return $this->hasOneof(2); - } - - /** - * A pipelined operation. - * - * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; - * @param \Google\Cloud\Firestore\V1\StructuredPipeline $var - * @return $this - */ - public function setStructuredPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredPipeline::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getPipelineType() - { - return $this->whichOneof("pipeline_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php deleted file mode 100644 index 6ee7dc36a3e0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php +++ /dev/null @@ -1,285 +0,0 @@ -google.firestore.v1.ExecutePipelineResponse - */ -class ExecutePipelineResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - */ - private $results; - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - */ - protected $execution_time = null; - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - */ - protected $explain_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * @type \Google\Cloud\Firestore\V1\Document[] $results - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * @type \Google\Protobuf\Timestamp $execution_time - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * @type \Google\Cloud\Firestore\V1\ExplainStats $explain_stats - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> - */ - public function getResults() - { - return $this->results; - } - - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - * @param \Google\Cloud\Firestore\V1\Document[] $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->results = $arr; - - return $this; - } - - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExecutionTime() - { - return $this->execution_time; - } - - public function hasExecutionTime() - { - return isset($this->execution_time); - } - - public function clearExecutionTime() - { - unset($this->execution_time); - } - - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExecutionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->execution_time = $var; - - return $this; - } - - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - * @return \Google\Cloud\Firestore\V1\ExplainStats|null - */ - public function getExplainStats() - { - return $this->explain_stats; - } - - public function hasExplainStats() - { - return isset($this->explain_stats); - } - - public function clearExplainStats() - { - unset($this->explain_stats); - } - - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - * @param \Google\Cloud\Firestore\V1\ExplainStats $var - * @return $this - */ - public function setExplainStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainStats::class); - $this->explain_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php deleted file mode 100644 index 63cbbcf07b0c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php +++ /dev/null @@ -1,237 +0,0 @@ -google.firestore.v1.ExecutionStats - */ -class ExecutionStats extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - */ - protected $results_returned = 0; - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - */ - protected $execution_duration = null; - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - */ - protected $read_operations = 0; - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - */ - protected $debug_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $results_returned - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * @type \Google\Protobuf\Duration $execution_duration - * Total time to execute the query in the backend. - * @type int|string $read_operations - * Total billable read operations. - * @type \Google\Protobuf\Struct $debug_stats - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @return int|string - */ - public function getResultsReturned() - { - return $this->results_returned; - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @param int|string $var - * @return $this - */ - public function setResultsReturned($var) - { - GPBUtil::checkInt64($var); - $this->results_returned = $var; - - return $this; - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getExecutionDuration() - { - return $this->execution_duration; - } - - public function hasExecutionDuration() - { - return isset($this->execution_duration); - } - - public function clearExecutionDuration() - { - unset($this->execution_duration); - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExecutionDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->execution_duration = $var; - - return $this; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @return int|string - */ - public function getReadOperations() - { - return $this->read_operations; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @param int|string $var - * @return $this - */ - public function setReadOperations($var) - { - GPBUtil::checkInt64($var); - $this->read_operations = $var; - - return $this; - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getDebugStats() - { - return $this->debug_stats; - } - - public function hasDebugStats() - { - return isset($this->debug_stats); - } - - public function clearDebugStats() - { - unset($this->debug_stats); - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDebugStats($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->debug_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php deleted file mode 100644 index a136f19886db..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php +++ /dev/null @@ -1,209 +0,0 @@ -google.firestore.v1.ExistenceFilter - */ -class ExistenceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - */ - protected $target_id = 0; - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - */ - protected $count = 0; - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - */ - protected $unchanged_names = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_id - * The target ID to which this filter applies. - * @type int $count - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * @type \Google\Cloud\Firestore\V1\BloomFilter $unchanged_names - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @return \Google\Cloud\Firestore\V1\BloomFilter|null - */ - public function getUnchangedNames() - { - return $this->unchanged_names; - } - - public function hasUnchangedNames() - { - return isset($this->unchanged_names); - } - - public function clearUnchangedNames() - { - unset($this->unchanged_names); - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @param \Google\Cloud\Firestore\V1\BloomFilter $var - * @return $this - */ - public function setUnchangedNames($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BloomFilter::class); - $this->unchanged_names = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php deleted file mode 100644 index 0e879bab9188..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.v1.ExplainMetrics - */ -class ExplainMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - */ - protected $plan_summary = null; - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - */ - protected $execution_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\PlanSummary $plan_summary - * Planning phase information for the query. - * @type \Google\Cloud\Firestore\V1\ExecutionStats $execution_stats - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @return \Google\Cloud\Firestore\V1\PlanSummary|null - */ - public function getPlanSummary() - { - return $this->plan_summary; - } - - public function hasPlanSummary() - { - return isset($this->plan_summary); - } - - public function clearPlanSummary() - { - unset($this->plan_summary); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @param \Google\Cloud\Firestore\V1\PlanSummary $var - * @return $this - */ - public function setPlanSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PlanSummary::class); - $this->plan_summary = $var; - - return $this; - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @return \Google\Cloud\Firestore\V1\ExecutionStats|null - */ - public function getExecutionStats() - { - return $this->execution_stats; - } - - public function hasExecutionStats() - { - return isset($this->execution_stats); - } - - public function clearExecutionStats() - { - unset($this->execution_stats); - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @param \Google\Cloud\Firestore\V1\ExecutionStats $var - * @return $this - */ - public function setExecutionStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExecutionStats::class); - $this->execution_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php deleted file mode 100644 index 05b64823f7d4..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.ExplainOptions - */ -class ExplainOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $analyze = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $analyze - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAnalyze() - { - return $this->analyze; - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAnalyze($var) - { - GPBUtil::checkBool($var); - $this->analyze = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php deleted file mode 100644 index ca8d929ebf74..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.v1.ExplainStats - */ -class ExplainStats extends \Google\Protobuf\Internal\Message -{ - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - */ - protected $data = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Any $data - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\ExplainStats::initOnce(); - parent::__construct($data); - } - - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - * @return \Google\Protobuf\Any|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php deleted file mode 100644 index 4e4caa99345d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.firestore.v1.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(3); - } - - public function hasTransaction() - { - return $this->hasOneof(3); - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(5); - } - - public function hasReadTime() - { - return $this->hasOneof(5); - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php deleted file mode 100644 index 5ff67a8a156a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListCollectionIdsRequest - */ -class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - protected $consistency_selector; - - /** - * @param string $parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * @return \Google\Cloud\Firestore\V1\ListCollectionIdsRequest - * - * @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 document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * 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. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * 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; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(4); - } - - public function hasReadTime() - { - return $this->hasOneof(4); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php deleted file mode 100644 index 9607c86c708c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.firestore.v1.ListCollectionIdsResponse - */ -class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - */ - private $collection_ids; - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $collection_ids - * The collection ids. - * @type string $next_page_token - * A page token that may be used to continue the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php deleted file mode 100644 index 95df1ff70628..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php +++ /dev/null @@ -1,462 +0,0 @@ -google.firestore.v1.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $collection_id = ''; - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mask = null; - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - */ - protected $show_missing = false; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type string $collection_id - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * @type int $page_size - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * @type string $page_token - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * @type string $order_by - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Perform the read as part of an already active transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type bool $show_missing - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(8); - } - - public function hasTransaction() - { - return $this->hasOneof(8); - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(10); - } - - public function hasReadTime() - { - return $this->hasOneof(10); - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @return bool - */ - public function getShowMissing() - { - return $this->show_missing; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @param bool $var - * @return $this - */ - public function setShowMissing($var) - { - GPBUtil::checkBool($var); - $this->show_missing = $var; - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php deleted file mode 100644 index cc7b6cc12bf7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.v1.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - */ - private $documents; - /** - * A token to retrieve the next page of documents. - * 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 \Google\Cloud\Firestore\V1\Document[] $documents - * The Documents found. - * @type string $next_page_token - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @param \Google\Cloud\Firestore\V1\Document[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of documents. - * 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 to retrieve the next page of documents. - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php deleted file mode 100644 index 806288a8cb01..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.firestore.v1.ListenRequest - */ -class ListenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $target_change; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Target $add_target - * A target to add to this stream. - * @type int $remove_target - * The ID of a target to remove from this stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this target change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @return \Google\Cloud\Firestore\V1\Target|null - */ - public function getAddTarget() - { - return $this->readOneof(2); - } - - public function hasAddTarget() - { - return $this->hasOneof(2); - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @param \Google\Cloud\Firestore\V1\Target $var - * @return $this - */ - public function setAddTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @return int - */ - public function getRemoveTarget() - { - return $this->readOneof(3); - } - - public function hasRemoveTarget() - { - return $this->hasOneof(3); - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @param int $var - * @return $this - */ - public function setRemoveTarget($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetChange() - { - return $this->whichOneof("target_change"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php deleted file mode 100644 index 1848b4a3012f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListenResponse - */ -class ListenResponse extends \Google\Protobuf\Internal\Message -{ - protected $response_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TargetChange $target_change - * Targets have changed. - * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change - * A [Document][google.firestore.v1.Document] has changed. - * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete - * A [Document][google.firestore.v1.Document] has been deleted. - * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @return \Google\Cloud\Firestore\V1\TargetChange|null - */ - public function getTargetChange() - { - return $this->readOneof(2); - } - - public function hasTargetChange() - { - return $this->hasOneof(2); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @param \Google\Cloud\Firestore\V1\TargetChange $var - * @return $this - */ - public function setTargetChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @return \Google\Cloud\Firestore\V1\DocumentChange|null - */ - public function getDocumentChange() - { - return $this->readOneof(3); - } - - public function hasDocumentChange() - { - return $this->hasOneof(3); - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @param \Google\Cloud\Firestore\V1\DocumentChange $var - * @return $this - */ - public function setDocumentChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @return \Google\Cloud\Firestore\V1\DocumentDelete|null - */ - public function getDocumentDelete() - { - return $this->readOneof(4); - } - - public function hasDocumentDelete() - { - return $this->hasOneof(4); - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @param \Google\Cloud\Firestore\V1\DocumentDelete $var - * @return $this - */ - public function setDocumentDelete($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @return \Google\Cloud\Firestore\V1\DocumentRemove|null - */ - public function getDocumentRemove() - { - return $this->readOneof(6); - } - - public function hasDocumentRemove() - { - return $this->hasOneof(6); - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @param \Google\Cloud\Firestore\V1\DocumentRemove $var - * @return $this - */ - public function setDocumentRemove($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null - */ - public function getFilter() - { - return $this->readOneof(5); - } - - public function hasFilter() - { - return $this->hasOneof(5); - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponseType() - { - return $this->whichOneof("response_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php deleted file mode 100644 index 23d448dfcd95..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.MapValue - */ -class MapValue extends \Google\Protobuf\Internal\Message -{ - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $fields - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php deleted file mode 100644 index c43b051420c3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php +++ /dev/null @@ -1,149 +0,0 @@ -google.firestore.v1.Function - */ -class PBFunction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * @type \Google\Cloud\Firestore\V1\Value[] $args - * Optional. Ordered list of arguments the given function expects. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional named arguments that certain functions may support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->args = $arr; - - return $this; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php deleted file mode 100644 index 8ef18f40550b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php +++ /dev/null @@ -1,364 +0,0 @@ -google.firestore.v1.PartitionQueryRequest - */ -class PartitionQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - */ - protected $partition_count = 0; - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int|string $partition_count - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @type string $page_token - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * @type int $page_size - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @return int|string - */ - public function getPartitionCount() - { - return $this->partition_count; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @param int|string $var - * @return $this - */ - public function setPartitionCount($var) - { - GPBUtil::checkInt64($var); - $this->partition_count = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php deleted file mode 100644 index 4592a55de307..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php +++ /dev/null @@ -1,162 +0,0 @@ -google.firestore.v1.PartitionQueryResponse - */ -class PartitionQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - */ - private $partitions; - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * 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 \Google\Cloud\Firestore\V1\Cursor[] $partitions - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * @type string $next_page_token - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Cursor> - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @param \Google\Cloud\Firestore\V1\Cursor[] $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); - $this->partitions = $arr; - - return $this; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * 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/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php deleted file mode 100644 index 8d5c8afc6abc..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.Pipeline - */ -class Pipeline extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $stages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Pipeline\Stage[] $stages - * Required. Ordered list of stages to evaluate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Pipeline\Stage> - */ - public function getStages() - { - return $this->stages; - } - - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Pipeline\Stage[] $var - * @return $this - */ - public function setStages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Pipeline\Stage::class); - $this->stages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php deleted file mode 100644 index 47a7f1e726f9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php +++ /dev/null @@ -1,157 +0,0 @@ -google.firestore.v1.Pipeline.Stage - */ -class Stage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * @type \Google\Cloud\Firestore\V1\Value[] $args - * Optional. Ordered list of arguments the given stage expects. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional named arguments that certain functions may support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->args = $arr; - - return $this; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php deleted file mode 100644 index 517cd29d648f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.PlanSummary - */ -class PlanSummary extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - */ - private $indexes_used; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct[] $indexes_used - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @return RepeatedField<\Google\Protobuf\Struct> - */ - public function getIndexesUsed() - { - return $this->indexes_used; - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @param \Google\Protobuf\Struct[] $var - * @return $this - */ - public function setIndexesUsed($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); - $this->indexes_used = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php deleted file mode 100644 index a78e481b7ad5..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.Precondition - */ -class Precondition extends \Google\Protobuf\Internal\Message -{ - protected $condition_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $exists - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * @type \Google\Protobuf\Timestamp $update_time - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @return bool - */ - public function getExists() - { - return $this->readOneof(1); - } - - public function hasExists() - { - return $this->hasOneof(1); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @param bool $var - * @return $this - */ - public function setExists($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->readOneof(2); - } - - public function hasUpdateTime() - { - return $this->hasOneof(2); - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * 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->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConditionType() - { - return $this->whichOneof("condition_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php deleted file mode 100644 index ab42c1a2a4c9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.firestore.v1.RollbackRequest - */ -class RollbackRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string $transaction Required. The transaction to roll back. - * - * @return \Google\Cloud\Firestore\V1\RollbackRequest - * - * @experimental - */ - public static function build(string $database, string $transaction): self - { - return (new self()) - ->setDatabase($database) - ->setTransaction($transaction); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string $transaction - * Required. The transaction to roll back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php deleted file mode 100644 index 723a1d0962f1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php +++ /dev/null @@ -1,304 +0,0 @@ -google.firestore.v1.RunAggregationQueryRequest - */ -class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null - */ - public function getStructuredAggregationQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredAggregationQuery() - { - return $this->hasOneof(2); - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var - * @return $this - */ - public function setStructuredAggregationQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php deleted file mode 100644 index ace604bf5ecf..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php +++ /dev/null @@ -1,244 +0,0 @@ -google.firestore.v1.RunAggregationQueryResponse - */ -class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - */ - protected $result = null; - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - */ - protected $explain_metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\AggregationResult $result - * A single aggregation result. - * Not present when reporting partial progress. - * @type string $transaction - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @return \Google\Cloud\Firestore\V1\AggregationResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @param \Google\Cloud\Firestore\V1\AggregationResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); - $this->result = $var; - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php deleted file mode 100644 index 91a9b297f86a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.firestore.v1.RunQueryRequest - */ -class RunQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php deleted file mode 100644 index 0ee820b70e32..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.v1.RunQueryResponse - */ -class RunQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - */ - protected $skipped_results = 0; - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - */ - protected $explain_metrics = null; - protected $continuation_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * @type \Google\Cloud\Firestore\V1\Document $document - * A query result, not set when reporting partial progress. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * @type int $skipped_results - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * @type bool $done - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @return int - */ - public function getSkippedResults() - { - return $this->skipped_results; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @param int $var - * @return $this - */ - public function setSkippedResults($var) - { - GPBUtil::checkInt32($var); - $this->skipped_results = $var; - - return $this; - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @return bool - */ - public function getDone() - { - return $this->readOneof(6); - } - - public function hasDone() - { - return $this->hasOneof(6); - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - - /** - * @return string - */ - public function getContinuationSelector() - { - return $this->whichOneof("continuation_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php deleted file mode 100644 index 38f437249c88..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php +++ /dev/null @@ -1,122 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery - */ -class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aggregations; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * Nested structured query. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $aggregations - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(1); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(1); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation> - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php deleted file mode 100644 index 04b2898c8e33..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php +++ /dev/null @@ -1,287 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alias = ''; - protected $operator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count - * Count aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $sum - * Sum aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $avg - * Average aggregator. - * @type string $alias - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null - */ - public function getCount() - { - return $this->readOneof(1); - } - - public function hasCount() - { - return $this->hasOneof(1); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum|null - */ - public function getSum() - { - return $this->readOneof(2); - } - - public function hasSum() - { - return $this->hasOneof(2); - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg|null - */ - public function getAvg() - { - return $this->readOneof(3); - } - - public function hasAvg() - { - return $this->hasOneof(3); - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $var - * @return $this - */ - public function setAvg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->whichOneof("operator"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php deleted file mode 100644 index 7c58f19ceb45..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg - */ -class Avg extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php deleted file mode 100644 index 5202b92cc409..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php +++ /dev/null @@ -1,166 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $up_to = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $up_to - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getUpTo() - { - return $this->up_to; - } - - public function hasUpTo() - { - return isset($this->up_to); - } - - public function clearUpTo() - { - unset($this->up_to); - } - - /** - * Returns the unboxed value from getUpTo() - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getUpToUnwrapped() - { - return $this->readWrapperValue("up_to"); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setUpTo($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->up_to = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setUpToUnwrapped($var) - { - $this->writeWrapperValue("up_to", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php deleted file mode 100644 index 5e6f0ef1b0ce..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php +++ /dev/null @@ -1,92 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php deleted file mode 100644 index 91fb0cfa1f68..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.StructuredPipeline - */ -class StructuredPipeline extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pipeline = null; - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline - * Required. The pipeline query to execute. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional query-level arguments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Pipeline::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Pipeline|null - */ - public function getPipeline() - { - return $this->pipeline; - } - - public function hasPipeline() - { - return isset($this->pipeline); - } - - public function clearPipeline() - { - unset($this->pipeline); - } - - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Pipeline $var - * @return $this - */ - public function setPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); - $this->pipeline = $var; - - return $this; - } - - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php deleted file mode 100644 index 7ec21ccd6c9d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php +++ /dev/null @@ -1,652 +0,0 @@ -google.firestore.v1.StructuredQuery - */ -class StructuredQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - */ - protected $select = null; - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - */ - private $from; - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - */ - protected $where = null; - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - */ - private $order_by; - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - */ - protected $start_at = null; - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - */ - protected $end_at = null; - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - */ - protected $limit = null; - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $find_nearest = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $from - * The collections to query. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where - * The filter to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $order_by - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * @type \Google\Cloud\Firestore\V1\Cursor $start_at - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type \Google\Cloud\Firestore\V1\Cursor $end_at - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type int $offset - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Protobuf\Int32Value $limit - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $find_nearest - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null - */ - public function getSelect() - { - return $this->select; - } - - public function hasSelect() - { - return isset($this->select); - } - - public function clearSelect() - { - unset($this->select); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var - * @return $this - */ - public function setSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); - $this->select = $var; - - return $this; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector> - */ - public function getFrom() - { - return $this->from; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $var - * @return $this - */ - public function setFrom($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); - $this->from = $arr; - - return $this; - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null - */ - public function getWhere() - { - return $this->where; - } - - public function hasWhere() - { - return isset($this->where); - } - - public function clearWhere() - { - unset($this->where); - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var - * @return $this - */ - public function setWhere($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->where = $var; - - return $this; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Order> - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $var - * @return $this - */ - public function setOrderBy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); - $this->order_by = $arr; - - return $this; - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getStartAt() - { - return $this->start_at; - } - - public function hasStartAt() - { - return isset($this->start_at); - } - - public function clearStartAt() - { - unset($this->start_at); - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setStartAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->start_at = $var; - - return $this; - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getEndAt() - { - return $this->end_at; - } - - public function hasEndAt() - { - return isset($this->end_at); - } - - public function clearEndAt() - { - unset($this->end_at); - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setEndAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->end_at = $var; - - return $this; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * 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 maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest|null - */ - public function getFindNearest() - { - return $this->find_nearest; - } - - public function hasFindNearest() - { - return isset($this->find_nearest); - } - - public function clearFindNearest() - { - unset($this->find_nearest); - } - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $var - * @return $this - */ - public function setFindNearest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest::class); - $this->find_nearest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php deleted file mode 100644 index cf990906266f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.StructuredQuery.CollectionSelector - */ -class CollectionSelector extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - */ - protected $collection_id = ''; - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - */ - protected $all_descendants = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection_id - * The collection ID. - * When set, selects only collections with this ID. - * @type bool $all_descendants - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @return bool - */ - public function getAllDescendants() - { - return $this->all_descendants; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @param bool $var - * @return $this - */ - public function setAllDescendants($var) - { - GPBUtil::checkBool($var); - $this->all_descendants = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php deleted file mode 100644 index 5a006c7a4ddd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter - */ -class CompositeFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - */ - protected $op = 0; - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The operator for combining multiple filters. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $filters - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Filter> - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->filters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php deleted file mode 100644 index ae6554be217b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php +++ /dev/null @@ -1,65 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * Documents are required to satisfy all of the combined filters. - * - * Generated from protobuf enum AND = 1; - */ - const PBAND = 1; - /** - * Documents are required to satisfy at least one of the combined filters. - * - * Generated from protobuf enum OR = 2; - */ - const PBOR = 2; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::PBAND => 'AND', - self::PBOR => 'OR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php deleted file mode 100644 index 0c598d813733..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.v1.StructuredQuery.Direction - */ -class Direction -{ - /** - * Unspecified. - * - * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; - */ - const DIRECTION_UNSPECIFIED = 0; - /** - * Ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php deleted file mode 100644 index 07005156b426..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php +++ /dev/null @@ -1,155 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter - */ -class FieldFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - */ - protected $op = 0; - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to filter by. - * @type int $op - * The operator to filter by. - * @type \Google\Cloud\Firestore\V1\Value $value - * The value to compare to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php deleted file mode 100644 index 23eae118d8f1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php +++ /dev/null @@ -1,143 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is less than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN = 1; - */ - const LESS_THAN = 1; - /** - * The given `field` is less than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; - */ - const LESS_THAN_OR_EQUAL = 2; - /** - * The given `field` is greater than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN = 3; - */ - const GREATER_THAN = 3; - /** - * The given `field` is greater than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; - */ - const GREATER_THAN_OR_EQUAL = 4; - /** - * The given `field` is equal to the given `value`. - * - * Generated from protobuf enum EQUAL = 5; - */ - const EQUAL = 5; - /** - * The given `field` is not equal to the given `value`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_EQUAL = 6; - */ - const NOT_EQUAL = 6; - /** - * The given `field` is an array that contains the given `value`. - * - * Generated from protobuf enum ARRAY_CONTAINS = 7; - */ - const ARRAY_CONTAINS = 7; - /** - * The given `field` is equal to at least one value in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum IN = 8; - */ - const IN = 8; - /** - * The given `field` is an array that contains any of the values in the - * given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; - */ - const ARRAY_CONTAINS_ANY = 9; - /** - * The value of the `field` is not in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, - * `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_IN = 10; - */ - const NOT_IN = 10; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::LESS_THAN => 'LESS_THAN', - self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', - self::GREATER_THAN => 'GREATER_THAN', - self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', - self::EQUAL => 'EQUAL', - self::NOT_EQUAL => 'NOT_EQUAL', - self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', - self::IN => 'IN', - self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', - self::NOT_IN => 'NOT_IN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php deleted file mode 100644 index 0b53587c59b6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - */ - protected $field_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php deleted file mode 100644 index 3a0beed1562c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php +++ /dev/null @@ -1,141 +0,0 @@ -google.firestore.v1.StructuredQuery.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - protected $filter_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter - * A composite filter. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter - * A filter on a document field. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter - * A filter that takes exactly one argument. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null - */ - public function getCompositeFilter() - { - return $this->readOneof(1); - } - - public function hasCompositeFilter() - { - return $this->hasOneof(1); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var - * @return $this - */ - public function setCompositeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null - */ - public function getFieldFilter() - { - return $this->readOneof(2); - } - - public function hasFieldFilter() - { - return $this->hasOneof(2); - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var - * @return $this - */ - public function setFieldFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null - */ - public function getUnaryFilter() - { - return $this->readOneof(3); - } - - public function hasUnaryFilter() - { - return $this->hasOneof(3); - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var - * @return $this - */ - public function setUnaryFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilterType() - { - return $this->whichOneof("filter_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php deleted file mode 100644 index b9f2d3f526a9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php +++ /dev/null @@ -1,396 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest - */ -class FindNearest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vector_field = null; - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_vector = null; - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distance_measure = 0; - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $limit = null; - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_result_field = ''; - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_threshold = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $vector_field - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * @type \Google\Cloud\Firestore\V1\Value $query_vector - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * @type int $distance_measure - * Required. The distance measure to use, required. - * @type \Google\Protobuf\Int32Value $limit - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * @type string $distance_result_field - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * @type \Google\Protobuf\DoubleValue $distance_threshold - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getVectorField() - { - return $this->vector_field; - } - - public function hasVectorField() - { - return isset($this->vector_field); - } - - public function clearVectorField() - { - unset($this->vector_field); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setVectorField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->vector_field = $var; - - return $this; - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getQueryVector() - { - return $this->query_vector; - } - - public function hasQueryVector() - { - return isset($this->query_vector); - } - - public function clearQueryVector() - { - unset($this->query_vector); - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setQueryVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->query_vector = $var; - - return $this; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDistanceMeasure() - { - return $this->distance_measure; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDistanceMeasure($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest\DistanceMeasure::class); - $this->distance_measure = $var; - - return $this; - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDistanceResultField() - { - return $this->distance_result_field; - } - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDistanceResultField($var) - { - GPBUtil::checkString($var, True); - $this->distance_result_field = $var; - - return $this; - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getDistanceThreshold() - { - return $this->distance_threshold; - } - - public function hasDistanceThreshold() - { - return isset($this->distance_threshold); - } - - public function clearDistanceThreshold() - { - unset($this->distance_threshold); - } - - /** - * Returns the unboxed value from getDistanceThreshold() - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return float|null - */ - public function getDistanceThresholdUnwrapped() - { - return $this->readWrapperValue("distance_threshold"); - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setDistanceThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->distance_threshold = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param float|null $var - * @return $this - */ - public function setDistanceThresholdUnwrapped($var) - { - $this->writeWrapperValue("distance_threshold", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php deleted file mode 100644 index 27f0c9d19df1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php +++ /dev/null @@ -1,80 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure - */ -class DistanceMeasure -{ - /** - * Should not be set. - * - * Generated from protobuf enum DISTANCE_MEASURE_UNSPECIFIED = 0; - */ - const DISTANCE_MEASURE_UNSPECIFIED = 0; - /** - * Measures the EUCLIDEAN distance between the vectors. See - * [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn - * more. The resulting distance decreases the more similar two vectors - * are. - * - * Generated from protobuf enum EUCLIDEAN = 1; - */ - const EUCLIDEAN = 1; - /** - * COSINE distance compares vectors based on the angle between them, which - * allows you to measure similarity that isn't based on the vectors - * magnitude. We recommend using DOT_PRODUCT with unit normalized vectors - * instead of COSINE distance, which is mathematically equivalent with - * better performance. See [Cosine - * Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn - * more about COSINE similarity and COSINE distance. The resulting - * COSINE distance decreases the more similar two vectors are. - * - * Generated from protobuf enum COSINE = 2; - */ - const COSINE = 2; - /** - * Similar to cosine but is affected by the magnitude of the vectors. See - * [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. - * The resulting distance increases the more similar two vectors are. - * - * Generated from protobuf enum DOT_PRODUCT = 3; - */ - const DOT_PRODUCT = 3; - - private static $valueToName = [ - self::DISTANCE_MEASURE_UNSPECIFIED => 'DISTANCE_MEASURE_UNSPECIFIED', - self::EUCLIDEAN => 'EUCLIDEAN', - self::COSINE => 'COSINE', - self::DOT_PRODUCT => 'DOT_PRODUCT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php deleted file mode 100644 index 398914ff2a88..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php +++ /dev/null @@ -1,111 +0,0 @@ -google.firestore.v1.StructuredQuery.Order - */ -class Order extends \Google\Protobuf\Internal\Message -{ - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - protected $direction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to order by. - * @type int $direction - * The direction to order by. Defaults to `ASCENDING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @param int $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); - $this->direction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php deleted file mode 100644 index 07788a015d64..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.v1.StructuredQuery.Projection - */ -class Projection extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $fields - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php deleted file mode 100644 index e7cffcd5e3c6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter - */ -class UnaryFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - protected $op = 0; - protected $operand_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The unary operator to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to which to apply the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->readOneof(2); - } - - public function hasField() - { - return $this->hasOneof(2); - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getOperandType() - { - return $this->whichOneof("operand_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php deleted file mode 100644 index 4c991e2fd636..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php +++ /dev/null @@ -1,81 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is equal to `NaN`. - * - * Generated from protobuf enum IS_NAN = 2; - */ - const IS_NAN = 2; - /** - * The given `field` is equal to `NULL`. - * - * Generated from protobuf enum IS_NULL = 3; - */ - const IS_NULL = 3; - /** - * The given `field` is not equal to `NaN`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NAN = 4; - */ - const IS_NOT_NAN = 4; - /** - * The given `field` is not equal to `NULL`. - * Requires: - * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NULL = 5; - */ - const IS_NOT_NULL = 5; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IS_NAN => 'IS_NAN', - self::IS_NULL => 'IS_NULL', - self::IS_NOT_NAN => 'IS_NOT_NAN', - self::IS_NOT_NULL => 'IS_NOT_NULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php deleted file mode 100644 index 187794cd9a71..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php +++ /dev/null @@ -1,407 +0,0 @@ -google.firestore.v1.Target - */ -class Target extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - */ - protected $target_id = 0; - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - */ - protected $once = false; - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - */ - protected $expected_count = null; - protected $target_type; - protected $resume_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query - * A target specified by a query. - * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents - * A target specified by a set of document names. - * @type string $resume_token - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * @type \Google\Protobuf\Timestamp $read_time - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * @type int $target_id - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * @type bool $once - * If the target should be removed once it is current and consistent. - * @type \Google\Protobuf\Int32Value $expected_count - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null - */ - public function getQuery() - { - return $this->readOneof(2); - } - - public function hasQuery() - { - return $this->hasOneof(2); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null - */ - public function getDocuments() - { - return $this->readOneof(3); - } - - public function hasDocuments() - { - return $this->hasOneof(3); - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var - * @return $this - */ - public function setDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->readOneof(4); - } - - public function hasResumeToken() - { - return $this->hasOneof(4); - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(11); - } - - public function hasReadTime() - { - return $this->hasOneof(11); - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @return bool - */ - public function getOnce() - { - return $this->once; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @param bool $var - * @return $this - */ - public function setOnce($var) - { - GPBUtil::checkBool($var); - $this->once = $var; - - return $this; - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return \Google\Protobuf\Int32Value|null - */ - public function getExpectedCount() - { - return $this->expected_count; - } - - public function hasExpectedCount() - { - return isset($this->expected_count); - } - - public function clearExpectedCount() - { - unset($this->expected_count); - } - - /** - * Returns the unboxed value from getExpectedCount() - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return int|null - */ - public function getExpectedCountUnwrapped() - { - return $this->readWrapperValue("expected_count"); - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setExpectedCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->expected_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param int|null $var - * @return $this - */ - public function setExpectedCountUnwrapped($var) - { - $this->writeWrapperValue("expected_count", $var); - return $this;} - - /** - * @return string - */ - public function getTargetType() - { - return $this->whichOneof("target_type"); - } - - /** - * @return string - */ - public function getResumeType() - { - return $this->whichOneof("resume_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php deleted file mode 100644 index b4cab2dfd941..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php +++ /dev/null @@ -1,79 +0,0 @@ -google.firestore.v1.Target.DocumentsTarget - */ -class DocumentsTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param string[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php deleted file mode 100644 index 94ccd8393aa9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.v1.Target.QueryTarget - */ -class QueryTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php deleted file mode 100644 index a47a27e138bd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php +++ /dev/null @@ -1,267 +0,0 @@ -google.firestore.v1.TargetChange - */ -class TargetChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - */ - protected $target_change_type = 0; - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - */ - private $target_ids; - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - */ - protected $cause = null; - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - */ - protected $resume_token = ''; - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_change_type - * The type of change that occurred. - * @type int[] $target_ids - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * @type \Google\Rpc\Status $cause - * The error that resulted in this change, if applicable. - * @type string $resume_token - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * @type \Google\Protobuf\Timestamp $read_time - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @return int - */ - public function getTargetChangeType() - { - return $this->target_change_type; - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @param int $var - * @return $this - */ - public function setTargetChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); - $this->target_change_type = $var; - - return $this; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @return RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @param int[] $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @return \Google\Rpc\Status|null - */ - public function getCause() - { - return $this->cause; - } - - public function hasCause() - { - return isset($this->cause); - } - - public function clearCause() - { - unset($this->cause); - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->cause = $var; - - return $this; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php deleted file mode 100644 index 0971283f5a47..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.TargetChange.TargetChangeType - */ -class TargetChangeType -{ - /** - * No change has occurred. Used only to send an updated `resume_token`. - * - * Generated from protobuf enum NO_CHANGE = 0; - */ - const NO_CHANGE = 0; - /** - * The targets have been added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The targets have been removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - /** - * The targets reflect all changes committed before the targets were added - * to the stream. - * This will be sent after or with a `read_time` that is greater than or - * equal to the time at which the targets were added. - * Listeners can wait for this change if read-after-write semantics - * are desired. - * - * Generated from protobuf enum CURRENT = 3; - */ - const CURRENT = 3; - /** - * The targets have been reset, and a new initial state for the targets - * will be returned in subsequent changes. - * After the initial state is complete, `CURRENT` will be returned even - * if the target was previously indicated to be `CURRENT`. - * - * Generated from protobuf enum RESET = 4; - */ - const RESET = 4; - - private static $valueToName = [ - self::NO_CHANGE => 'NO_CHANGE', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - self::CURRENT => 'CURRENT', - self::RESET => 'RESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php deleted file mode 100644 index d35fb47e9cdb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php +++ /dev/null @@ -1,108 +0,0 @@ -google.firestore.v1.TransactionOptions - */ -class TransactionOptions extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only - * The transaction can only be used for read operations. - * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write - * The transaction can be used for both read and write operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null - */ - public function getReadOnly() - { - return $this->readOneof(2); - } - - public function hasReadOnly() - { - return $this->hasOneof(2); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null - */ - public function getReadWrite() - { - return $this->readOneof(3); - } - - public function hasReadWrite() - { - return $this->hasOneof(3); - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var - * @return $this - */ - public function setReadWrite($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php deleted file mode 100644 index dde09490ca47..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php +++ /dev/null @@ -1,84 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadOnly - */ -class PBReadOnly extends \Google\Protobuf\Internal\Message -{ - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(2); - } - - public function hasReadTime() - { - return $this->hasOneof(2); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php deleted file mode 100644 index abf223a2244e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadWrite - */ -class ReadWrite extends \Google\Protobuf\Internal\Message -{ - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - */ - protected $retry_transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retry_transaction - * An optional transaction to retry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @return string - */ - public function getRetryTransaction() - { - return $this->retry_transaction; - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @param string $var - * @return $this - */ - public function setRetryTransaction($var) - { - GPBUtil::checkString($var, False); - $this->retry_transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php deleted file mode 100644 index 96c7684e0800..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.v1.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - - /** - * @param \Google\Cloud\Firestore\V1\Document $document Required. The updated document. - * Creates the document if it does not already exist. - * @param \Google\Cloud\Firestore\V1\DocumentMask $updateMask The fields to update. - * None of the field paths in the mask may contain a reserved name. - * - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * @return \Google\Cloud\Firestore\V1\UpdateDocumentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\V1\Document $document, \Google\Cloud\Firestore\V1\DocumentMask $updateMask): self - { - return (new self()) - ->setDocument($document) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The updated document. - * Creates the document if it does not already exist. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php deleted file mode 100644 index db0784d64e76..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php +++ /dev/null @@ -1,603 +0,0 @@ -google.firestore.v1.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - protected $value_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $null_value - * A null value. - * @type bool $boolean_value - * A boolean value. - * @type int|string $integer_value - * An integer value. - * @type float $double_value - * A double value. - * @type \Google\Protobuf\Timestamp $timestamp_value - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * @type string $string_value - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * @type string $bytes_value - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * @type string $reference_value - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Type\LatLng $geo_point_value - * A geo point value representing a point on the surface of Earth. - * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * @type \Google\Cloud\Firestore\V1\MapValue $map_value - * A map value. - * @type string $field_reference_value - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * @type string $variable_reference_value - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * @type \Google\Cloud\Firestore\V1\PBFunction $function_value - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline_value - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @return int - */ - public function getNullValue() - { - return $this->readOneof(11); - } - - public function hasNullValue() - { - return $this->hasOneof(11); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @param int $var - * @return $this - */ - public function setNullValue($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(1); - } - - public function hasBooleanValue() - { - return $this->hasOneof(1); - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(2); - } - - public function hasIntegerValue() - { - return $this->hasOneof(2); - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(3); - } - - public function hasDoubleValue() - { - return $this->hasOneof(3); - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(10); - } - - public function hasTimestampValue() - { - return $this->hasOneof(10); - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(17); - } - - public function hasStringValue() - { - return $this->hasOneof(17); - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @return string - */ - public function getBytesValue() - { - return $this->readOneof(18); - } - - public function hasBytesValue() - { - return $this->hasOneof(18); - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @param string $var - * @return $this - */ - public function setBytesValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @return string - */ - public function getReferenceValue() - { - return $this->readOneof(5); - } - - public function hasReferenceValue() - { - return $this->hasOneof(5); - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @param string $var - * @return $this - */ - public function setReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @return \Google\Type\LatLng|null - */ - public function getGeoPointValue() - { - return $this->readOneof(8); - } - - public function hasGeoPointValue() - { - return $this->hasOneof(8); - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setGeoPointValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getArrayValue() - { - return $this->readOneof(9); - } - - public function hasArrayValue() - { - return $this->hasOneof(9); - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setArrayValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @return \Google\Cloud\Firestore\V1\MapValue|null - */ - public function getMapValue() - { - return $this->readOneof(6); - } - - public function hasMapValue() - { - return $this->hasOneof(6); - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @param \Google\Cloud\Firestore\V1\MapValue $var - * @return $this - */ - public function setMapValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field string field_reference_value = 19; - * @return string - */ - public function getFieldReferenceValue() - { - return $this->readOneof(19); - } - - public function hasFieldReferenceValue() - { - return $this->hasOneof(19); - } - - /** - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field string field_reference_value = 19; - * @param string $var - * @return $this - */ - public function setFieldReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * - * Generated from protobuf field string variable_reference_value = 22; - * @return string - */ - public function getVariableReferenceValue() - { - return $this->readOneof(22); - } - - public function hasVariableReferenceValue() - { - return $this->hasOneof(22); - } - - /** - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * - * Generated from protobuf field string variable_reference_value = 22; - * @param string $var - * @return $this - */ - public function setVariableReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Function function_value = 20; - * @return \Google\Cloud\Firestore\V1\PBFunction|null - */ - public function getFunctionValue() - { - return $this->readOneof(20); - } - - public function hasFunctionValue() - { - return $this->hasOneof(20); - } - - /** - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Function function_value = 20; - * @param \Google\Cloud\Firestore\V1\PBFunction $var - * @return $this - */ - public function setFunctionValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PBFunction::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; - * @return \Google\Cloud\Firestore\V1\Pipeline|null - */ - public function getPipelineValue() - { - return $this->readOneof(21); - } - - public function hasPipelineValue() - { - return $this->hasOneof(21); - } - - /** - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; - * @param \Google\Cloud\Firestore\V1\Pipeline $var - * @return $this - */ - public function setPipelineValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueType() - { - return $this->whichOneof("value_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php deleted file mode 100644 index ed59c89434d1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php +++ /dev/null @@ -1,314 +0,0 @@ -google.firestore.v1.Write - */ -class Write extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - */ - protected $update_mask = null; - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - */ - private $update_transforms; - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - protected $operation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $update - * A document to write. - * @type string $delete - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform - * Applies a transformation to a document. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $update_transforms - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getUpdate() - { - return $this->readOneof(1); - } - - public function hasUpdate() - { - return $this->hasOneof(1); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @return string - */ - public function getDelete() - { - return $this->readOneof(2); - } - - public function hasDelete() - { - return $this->hasOneof(2); - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @param string $var - * @return $this - */ - public function setDelete($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @return \Google\Cloud\Firestore\V1\DocumentTransform|null - */ - public function getTransform() - { - return $this->readOneof(6); - } - - public function hasTransform() - { - return $this->hasOneof(6); - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @param \Google\Cloud\Firestore\V1\DocumentTransform $var - * @return $this - */ - public function setTransform($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> - */ - public function getUpdateTransforms() - { - return $this->update_transforms; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var - * @return $this - */ - public function setUpdateTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->update_transforms = $arr; - - return $this; - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperation() - { - return $this->whichOneof("operation"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php deleted file mode 100644 index cd8eef8c5f35..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.firestore.v1.WriteRequest - */ -class WriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - */ - protected $stream_id = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - */ - private $writes; - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - */ - protected $stream_token = ''; - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * @type string $stream_id - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * @type string $stream_token - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this write request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php deleted file mode 100644 index 7413907f1e2b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php +++ /dev/null @@ -1,203 +0,0 @@ -google.firestore.v1.WriteResponse - */ -class WriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - */ - protected $stream_id = ''; - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - */ - protected $stream_token = ''; - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * @type string $stream_token - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php deleted file mode 100644 index 3684d662245a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php +++ /dev/null @@ -1,131 +0,0 @@ -google.firestore.v1.WriteResult - */ -class WriteResult extends \Google\Protobuf\Internal\Message -{ - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - */ - private $transform_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * @type \Google\Cloud\Firestore\V1\Value[] $transform_results - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @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); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getTransformResults() - { - return $this->transform_results; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setTransformResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->transform_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php deleted file mode 100644 index f16bc62003d6..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php +++ /dev/null @@ -1,86 +0,0 @@ -setDatabase($database) - ->setDocuments($documents); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->batchGetDocuments($request); - - /** @var BatchGetDocumentsResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - $documentsElement = '[DOCUMENTS]'; - - batch_get_documents_sample($database, $documentsElement); -} -// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php deleted file mode 100644 index 102aa7be0006..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php +++ /dev/null @@ -1,66 +0,0 @@ -batchWrite($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php deleted file mode 100644 index 2349a880038e..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BeginTransactionResponse $response */ - $response = $firestoreClient->beginTransaction($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 -{ - $database = '[DATABASE]'; - - begin_transaction_sample($database); -} -// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php deleted file mode 100644 index 5cdc59666df0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php +++ /dev/null @@ -1,74 +0,0 @@ -setDatabase($database) - ->setWrites($writes); - - // Call the API and handle any network failures. - try { - /** @var CommitResponse $response */ - $response = $firestoreClient->commit($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 -{ - $database = '[DATABASE]'; - - commit_sample($database); -} -// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php deleted file mode 100644 index 9f9f17993eba..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->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 -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($parent, $collectionId, $documentId); -} -// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php deleted file mode 100644 index 4aaab650c29b..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $firestoreClient->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 -{ - $name = '[NAME]'; - - delete_document_sample($name); -} -// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php deleted file mode 100644 index 362c1d1510e0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php +++ /dev/null @@ -1,76 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->executePipeline($request); - - /** @var ExecutePipelineResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - execute_pipeline_sample($database); -} -// [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php deleted file mode 100644 index ed51bc93ad05..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->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 -{ - $name = '[NAME]'; - - get_document_sample($name); -} -// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php deleted file mode 100644 index 7dc6a65473ab..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->listCollectionIds($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_collection_ids_sample($parent); -} -// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php deleted file mode 100644 index f26d245154b1..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->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 -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - - list_documents_sample($parent, $collectionId); -} -// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php deleted file mode 100644 index f1c21fa3a7d6..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php +++ /dev/null @@ -1,78 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->listen(); - $stream->writeAll([$request,]); - - /** @var ListenResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - listen_sample($database); -} -// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php deleted file mode 100644 index e0baf617c0de..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php +++ /dev/null @@ -1,64 +0,0 @@ -partitionQuery($request); - - /** @var Cursor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php deleted file mode 100644 index 2708c09c4b40..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php +++ /dev/null @@ -1,72 +0,0 @@ -setDatabase($database) - ->setTransaction($transaction); - - // Call the API and handle any network failures. - try { - $firestoreClient->rollback($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 -{ - $database = '[DATABASE]'; - $transaction = '...'; - - rollback_sample($database, $transaction); -} -// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php deleted file mode 100644 index adf0798bfd4f..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runAggregationQuery($request); - - /** @var RunAggregationQueryResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - run_aggregation_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php deleted file mode 100644 index 0678620382ff..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runQuery($request); - - /** @var RunQueryResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - run_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php deleted file mode 100644 index efd6e77a8341..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->updateDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php deleted file mode 100644 index 635baa2a69d7..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php +++ /dev/null @@ -1,79 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->write(); - $stream->writeAll([$request,]); - - /** @var WriteResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - write_sample($database); -} -// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php deleted file mode 100644 index 3ffd4513dbd8..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php +++ /dev/null @@ -1,662 +0,0 @@ - batchWriteAsync(BatchWriteRequest $request, array $optionalArgs = []) - * @method PromiseInterface beginTransactionAsync(BeginTransactionRequest $request, array $optionalArgs = []) - * @method PromiseInterface commitAsync(CommitRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDocumentAsync(CreateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDocumentAsync(DeleteDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDocumentAsync(GetDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCollectionIdsAsync(ListCollectionIdsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDocumentsAsync(ListDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface partitionQueryAsync(PartitionQueryRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackAsync(RollbackRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDocumentAsync(UpdateDocumentRequest $request, array $optionalArgs = []) - */ -final class FirestoreClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.v1.Firestore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'firestore.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Firestore\V1\FirestoreClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FirestoreClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * - * @example samples/V1/FirestoreClient/batch_get_documents.php - * - * @param BatchGetDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchGetDocuments(BatchGetDocumentsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('BatchGetDocuments', $request, $callOptions); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the - * success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * - * The async variant is {@see FirestoreClient::batchWriteAsync()} . - * - * @example samples/V1/FirestoreClient/batch_write.php - * - * @param BatchWriteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchWriteResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchWrite(BatchWriteRequest $request, array $callOptions = []): BatchWriteResponse - { - return $this->startApiCall('BatchWrite', $request, $callOptions)->wait(); - } - - /** - * Starts a new transaction. - * - * The async variant is {@see FirestoreClient::beginTransactionAsync()} . - * - * @example samples/V1/FirestoreClient/begin_transaction.php - * - * @param BeginTransactionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BeginTransactionResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function beginTransaction(BeginTransactionRequest $request, array $callOptions = []): BeginTransactionResponse - { - return $this->startApiCall('BeginTransaction', $request, $callOptions)->wait(); - } - - /** - * Commits a transaction, while optionally updating documents. - * - * The async variant is {@see FirestoreClient::commitAsync()} . - * - * @example samples/V1/FirestoreClient/commit.php - * - * @param CommitRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CommitResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function commit(CommitRequest $request, array $callOptions = []): CommitResponse - { - return $this->startApiCall('Commit', $request, $callOptions)->wait(); - } - - /** - * Creates a new document. - * - * The async variant is {@see FirestoreClient::createDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/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. - * - * The async variant is {@see FirestoreClient::deleteDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/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(); - } - - /** - * Executes a pipeline query. - * - * @example samples/V1/FirestoreClient/execute_pipeline.php - * - * @param ExecutePipelineRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function executePipeline(ExecutePipelineRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ExecutePipeline', $request, $callOptions); - } - - /** - * Gets a single document. - * - * The async variant is {@see FirestoreClient::getDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/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(); - } - - /** - * Lists all the collection IDs underneath a document. - * - * The async variant is {@see FirestoreClient::listCollectionIdsAsync()} . - * - * @example samples/V1/FirestoreClient/list_collection_ids.php - * - * @param ListCollectionIdsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listCollectionIds(ListCollectionIdsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCollectionIds', $request, $callOptions); - } - - /** - * Lists documents. - * - * The async variant is {@see FirestoreClient::listDocumentsAsync()} . - * - * @example samples/V1/FirestoreClient/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); - } - - /** - * Listens to changes. This method is only available via gRPC or WebChannel - * (not REST). - * - * @example samples/V1/FirestoreClient/listen.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function listen(array $callOptions = []): BidiStream - { - return $this->startApiCall('Listen', null, $callOptions); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * - * The async variant is {@see FirestoreClient::partitionQueryAsync()} . - * - * @example samples/V1/FirestoreClient/partition_query.php - * - * @param PartitionQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 partitionQuery(PartitionQueryRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('PartitionQuery', $request, $callOptions); - } - - /** - * Rolls back a transaction. - * - * The async variant is {@see FirestoreClient::rollbackAsync()} . - * - * @example samples/V1/FirestoreClient/rollback.php - * - * @param RollbackRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 rollback(RollbackRequest $request, array $callOptions = []): void - { - $this->startApiCall('Rollback', $request, $callOptions)->wait(); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like - * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API - * allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * - * @example samples/V1/FirestoreClient/run_aggregation_query.php - * - * @param RunAggregationQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runAggregationQuery(RunAggregationQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunAggregationQuery', $request, $callOptions); - } - - /** - * Runs a query. - * - * @example samples/V1/FirestoreClient/run_query.php - * - * @param RunQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runQuery(RunQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunQuery', $request, $callOptions); - } - - /** - * Updates or inserts a document. - * - * The async variant is {@see FirestoreClient::updateDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/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(); - } - - /** - * Streams batches of document updates and deletes, in order. This method is - * only available via gRPC or WebChannel (not REST). - * - * @example samples/V1/FirestoreClient/write.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function write(array $callOptions = []): BidiStream - { - return $this->startApiCall('Write', null, $callOptions); - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 8793f858e7f3..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\V1", - "services": { - "Firestore": { - "clients": { - "grpc": { - "libraryClient": "FirestoreGapicClient", - "rpcs": { - "BatchGetDocuments": { - "methods": [ - "batchGetDocuments" - ] - }, - "BatchWrite": { - "methods": [ - "batchWrite" - ] - }, - "BeginTransaction": { - "methods": [ - "beginTransaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "CreateDocument": { - "methods": [ - "createDocument" - ] - }, - "DeleteDocument": { - "methods": [ - "deleteDocument" - ] - }, - "ExecutePipeline": { - "methods": [ - "executePipeline" - ] - }, - "GetDocument": { - "methods": [ - "getDocument" - ] - }, - "ListCollectionIds": { - "methods": [ - "listCollectionIds" - ] - }, - "ListDocuments": { - "methods": [ - "listDocuments" - ] - }, - "Listen": { - "methods": [ - "listen" - ] - }, - "PartitionQuery": { - "methods": [ - "partitionQuery" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "RunAggregationQuery": { - "methods": [ - "runAggregationQuery" - ] - }, - "RunQuery": { - "methods": [ - "runQuery" - ] - }, - "UpdateDocument": { - "methods": [ - "updateDocument" - ] - }, - "Write": { - "methods": [ - "write" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json deleted file mode 100644 index 3f189e07e6a3..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "interfaces": { - "google.firestore.v1.Firestore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_3_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_5_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "ABORTED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchGetDocuments": { - "timeout_millis": 300000 - }, - "BatchWrite": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "BeginTransaction": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Commit": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ExecutePipeline": { - "timeout_millis": 300000 - }, - "GetDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListCollectionIds": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Listen": { - "timeout_millis": 86400000 - }, - "PartitionQuery": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "Rollback": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "RunAggregationQuery": { - "timeout_millis": 300000 - }, - "RunQuery": { - "timeout_millis": 300000 - }, - "UpdateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Write": { - "timeout_millis": 86400000 - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php deleted file mode 100644 index d1232247d0ae..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php +++ /dev/null @@ -1,295 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchWriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BeginTransactionResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\CommitResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePipeline' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ExecutePipelineResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getDatabase', - ], - 'matchers' => [], - ], - [ - 'keyName' => 'database_id', - 'fieldAccessors' => [ - 'getDatabase', - ], - 'matchers' => [], - ], - ], - ], - 'GetDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollectionIds', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListCollectionIdsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'Listen' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListenResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\PartitionQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunAggregationQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'document.name', - 'fieldAccessors' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - 'Write' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\WriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php deleted file mode 100644 index 421c7325a999..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php +++ /dev/null @@ -1,304 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', - 'body' => 'document', - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePipeline' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:executePipeline', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', - ], - ], - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', - 'body' => 'document', - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php deleted file mode 100644 index 992ccc934a93..000000000000 --- a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php +++ /dev/null @@ -1,1405 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreClient($options); - } - - /** @test */ - public function batchGetDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $missing = 'missing1069449574'; - $transaction2 = '17'; - $expectedResponse = new BatchGetDocumentsResponse(); - $expectedResponse->setMissing($missing); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $missing2 = 'missing21243859865'; - $transaction3 = '18'; - $expectedResponse2 = new BatchGetDocumentsResponse(); - $expectedResponse2->setMissing($missing2); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $missing3 = 'missing31243859866'; - $transaction4 = '19'; - $expectedResponse3 = new BatchGetDocumentsResponse(); - $expectedResponse3->setMissing($missing3); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getDocuments(); - $this->assertProtobufEquals($documents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWrite($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new BatchWriteRequest(); - try { - $gapicClient->batchWrite($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction = '-34'; - $expectedResponse = new BeginTransactionResponse(); - $expectedResponse->setTransaction($transaction); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - $response = $gapicClient->beginTransaction($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - try { - $gapicClient->beginTransaction($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CommitResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - $response = $gapicClient->commit($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getWrites(); - $this->assertProtobufEquals($writes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - try { - $gapicClient->commit($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - $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.firestore.v1.Firestore/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - 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 - $name = 'name3373707'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - $gapicClient->deleteDocument($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $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 - $name = 'name3373707'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - 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 executePipelineTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new ExecutePipelineResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new ExecutePipelineResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new ExecutePipelineResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = (new ExecutePipelineRequest()) - ->setDatabase($database); - $serverStream = $gapicClient->executePipeline($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ExecutePipeline', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executePipelineExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $request = (new ExecutePipelineRequest()) - ->setDatabase($database); - $serverStream = $gapicClient->executePipeline($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetDocumentRequest()) - ->setName($name); - $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.firestore.v1.Firestore/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $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 - $name = 'name3373707'; - $request = (new GetDocumentRequest()) - ->setName($name); - 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 listCollectionIdsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionIdsElement = 'collectionIdsElement1368994900'; - $collectionIds = [ - $collectionIdsElement, - ]; - $expectedResponse = new ListCollectionIdsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollectionIds($collectionIds); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - $response = $gapicClient->listCollectionIds($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - try { - $gapicClient->listCollectionIds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - $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.firestore.v1.Firestore/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $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 - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - 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 listenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListenResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ListenResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ListenResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new ListenRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new ListenRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new ListenRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->listen(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->listen(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Cursor(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new PartitionQueryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - $request = new PartitionQueryRequest(); - $response = $gapicClient->partitionQuery($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new PartitionQueryRequest(); - try { - $gapicClient->partitionQuery($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - $gapicClient->rollback($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getTransaction(); - $this->assertProtobufEquals($transaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->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 - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - try { - $gapicClient->rollback($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new RunAggregationQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new RunAggregationQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new RunAggregationQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $skippedResults = 880286183; - $done = true; - $expectedResponse = new RunQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $expectedResponse->setSkippedResults($skippedResults); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $skippedResults2 = 153532454; - $done2 = false; - $expectedResponse2 = new RunQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $expectedResponse2->setSkippedResults($skippedResults2); - $expectedResponse2->setDone($done2); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $skippedResults3 = 153532453; - $done3 = true; - $expectedResponse3 = new RunQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $expectedResponse3->setSkippedResults($skippedResults3); - $expectedResponse3->setDone($done3); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - $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.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $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(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - 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 writeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $streamId = 'streamId-315624902'; - $streamToken = '122'; - $expectedResponse = new WriteResponse(); - $expectedResponse->setStreamId($streamId); - $expectedResponse->setStreamToken($streamToken); - $transport->addResponse($expectedResponse); - $streamId2 = 'streamId21627150189'; - $streamToken2 = '-83'; - $expectedResponse2 = new WriteResponse(); - $expectedResponse2->setStreamId($streamId2); - $expectedResponse2->setStreamToken($streamToken2); - $transport->addResponse($expectedResponse2); - $streamId3 = 'streamId31627150190'; - $streamToken3 = '-82'; - $expectedResponse3 = new WriteResponse(); - $expectedResponse3->setStreamId($streamId3); - $expectedResponse3->setStreamToken($streamToken3); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new WriteRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new WriteRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new WriteRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->write(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->write(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWriteAsync($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.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -}