From 393cda8e9b1a98c5e726e0af254f89c75f64c75e Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 14 Dec 2023 18:02:46 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20post-p?= =?UTF-8?q?rocessor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../metadata/Admin/V2/BigtableTableAdmin.php | Bin 12634 -> 12664 bytes .../Gapic/BigtableTableAdminGapicClient.php | 6 + .../Admin/V2/ModifyColumnFamiliesRequest.php | 34 + .../Admin/V2/BigtableInstanceAdmin.php | Bin 10454 -> 0 bytes .../Bigtable/Admin/V2/BigtableTableAdmin.php | Bin 12664 -> 0 bytes .../Google/Bigtable/Admin/V2/Common.php | Bin 1098 -> 0 bytes .../Google/Bigtable/Admin/V2/Instance.php | Bin 4321 -> 0 bytes .../Google/Bigtable/Admin/V2/Table.php | Bin 4960 -> 0 bytes .../Cloud/Bigtable/Admin/V2/AppProfile.php | 332 --- .../AppProfile/MultiClusterRoutingUseAny.php | 78 - .../Bigtable/Admin/V2/AppProfile/Priority.php | 67 - .../V2/AppProfile/SingleClusterRouting.php | 114 - .../Admin/V2/AppProfile/StandardIsolation.php | 71 - .../Bigtable/Admin/V2/AutoscalingLimits.php | 101 - .../Bigtable/Admin/V2/AutoscalingTargets.php | 133 - .../Google/Cloud/Bigtable/Admin/V2/Backup.php | 463 ---- .../Cloud/Bigtable/Admin/V2/Backup/State.php | 65 - .../Cloud/Bigtable/Admin/V2/BackupInfo.php | 239 -- .../Bigtable/Admin/V2/ChangeStreamConfig.php | 93 - .../Admin/V2/CheckConsistencyRequest.php | 128 - .../Admin/V2/CheckConsistencyResponse.php | 72 - .../Cloud/Bigtable/Admin/V2/Cluster.php | 315 --- .../V2/Cluster/ClusterAutoscalingConfig.php | 124 - .../Admin/V2/Cluster/ClusterConfig.php | 80 - .../Admin/V2/Cluster/EncryptionConfig.php | 107 - .../Cloud/Bigtable/Admin/V2/Cluster/State.php | 85 - .../Cloud/Bigtable/Admin/V2/ColumnFamily.php | 93 - .../Bigtable/Admin/V2/CopyBackupMetadata.php | 172 -- .../Bigtable/Admin/V2/CopyBackupRequest.php | 286 -- .../Admin/V2/CreateAppProfileRequest.php | 217 -- .../Admin/V2/CreateBackupMetadata.php | 190 -- .../Bigtable/Admin/V2/CreateBackupRequest.php | 199 -- .../Admin/V2/CreateClusterMetadata.php | 223 -- .../CreateClusterMetadata/TableProgress.php | 139 - .../TableProgress/State.php | 76 - .../Admin/V2/CreateClusterRequest.php | 183 -- .../Admin/V2/CreateInstanceMetadata.php | 165 -- .../Admin/V2/CreateInstanceRequest.php | 239 -- .../V2/CreateTableFromSnapshotMetadata.php | 173 -- .../V2/CreateTableFromSnapshotRequest.php | 184 -- .../Bigtable/Admin/V2/CreateTableRequest.php | 265 -- .../Admin/V2/CreateTableRequest/Split.php | 70 - .../Admin/V2/DeleteAppProfileRequest.php | 125 - .../Bigtable/Admin/V2/DeleteBackupRequest.php | 92 - .../Admin/V2/DeleteClusterRequest.php | 86 - .../Admin/V2/DeleteInstanceRequest.php | 86 - .../Admin/V2/DeleteSnapshotRequest.php | 96 - .../Bigtable/Admin/V2/DeleteTableRequest.php | 92 - .../Bigtable/Admin/V2/DropRowRangeRequest.php | 154 -- .../Bigtable/Admin/V2/EncryptionInfo.php | 160 -- .../V2/EncryptionInfo/EncryptionType.php | 72 - .../Google/Cloud/Bigtable/Admin/V2/GcRule.php | 180 -- .../Bigtable/Admin/V2/GcRule/Intersection.php | 70 - .../Cloud/Bigtable/Admin/V2/GcRule/Union.php | 70 - .../V2/GenerateConsistencyTokenRequest.php | 92 - .../V2/GenerateConsistencyTokenResponse.php | 68 - .../Admin/V2/GetAppProfileRequest.php | 86 - .../Bigtable/Admin/V2/GetBackupRequest.php | 92 - .../Bigtable/Admin/V2/GetClusterRequest.php | 86 - .../Bigtable/Admin/V2/GetInstanceRequest.php | 86 - .../Bigtable/Admin/V2/GetSnapshotRequest.php | 96 - .../Bigtable/Admin/V2/GetTableRequest.php | 130 - .../Cloud/Bigtable/Admin/V2/HotTablet.php | 315 --- .../Cloud/Bigtable/Admin/V2/Instance.php | 354 --- .../Bigtable/Admin/V2/Instance/State.php | 66 - .../Cloud/Bigtable/Admin/V2/Instance/Type.php | 68 - .../Admin/V2/ListAppProfilesRequest.php | 193 -- .../Admin/V2/ListAppProfilesResponse.php | 155 -- .../Bigtable/Admin/V2/ListBackupsRequest.php | 429 --- .../Bigtable/Admin/V2/ListBackupsResponse.php | 110 - .../Bigtable/Admin/V2/ListClustersRequest.php | 135 - .../Admin/V2/ListClustersResponse.php | 151 -- .../Admin/V2/ListHotTabletsRequest.php | 291 -- .../Admin/V2/ListHotTabletsResponse.php | 125 - .../Admin/V2/ListInstancesRequest.php | 120 - .../Admin/V2/ListInstancesResponse.php | 155 -- .../Admin/V2/ListSnapshotsRequest.php | 178 -- .../Admin/V2/ListSnapshotsResponse.php | 114 - .../Bigtable/Admin/V2/ListTablesRequest.php | 217 -- .../Bigtable/Admin/V2/ListTablesResponse.php | 110 - .../Admin/V2/ModifyColumnFamiliesRequest.php | 177 -- .../Modification.php | 187 -- .../Bigtable/Admin/V2/OperationProgress.php | 164 -- .../V2/OptimizeRestoredTableMetadata.php | 114 - .../Admin/V2/PartialUpdateClusterMetadata.php | 165 -- .../Admin/V2/PartialUpdateClusterRequest.php | 141 - .../Admin/V2/PartialUpdateInstanceRequest.php | 141 - .../Cloud/Bigtable/Admin/V2/RestoreInfo.php | 112 - .../Bigtable/Admin/V2/RestoreSourceType.php | 54 - .../Admin/V2/RestoreTableMetadata.php | 257 -- .../Bigtable/Admin/V2/RestoreTableRequest.php | 163 -- .../Cloud/Bigtable/Admin/V2/Snapshot.php | 334 --- .../Bigtable/Admin/V2/Snapshot/State.php | 66 - .../Admin/V2/SnapshotTableMetadata.php | 169 -- .../Admin/V2/SnapshotTableRequest.php | 286 -- .../Cloud/Bigtable/Admin/V2/StorageType.php | 61 - .../Google/Cloud/Bigtable/Admin/V2/Table.php | 364 --- .../Bigtable/Admin/V2/Table/ClusterState.php | 120 - .../Table/ClusterState/ReplicationState.php | 93 - .../Admin/V2/Table/TimestampGranularity.php | 59 - .../Cloud/Bigtable/Admin/V2/Table/View.php | 86 - .../Admin/V2/UndeleteTableMetadata.php | 156 -- .../Admin/V2/UndeleteTableRequest.php | 92 - .../Admin/V2/UpdateAppProfileMetadata.php | 33 - .../Admin/V2/UpdateAppProfileRequest.php | 175 -- .../Bigtable/Admin/V2/UpdateBackupRequest.php | 173 -- .../Admin/V2/UpdateClusterMetadata.php | 165 -- .../Admin/V2/UpdateInstanceMetadata.php | 165 -- .../Bigtable/Admin/V2/UpdateTableMetadata.php | 156 -- .../Bigtable/Admin/V2/UpdateTableRequest.php | 189 -- .../create_app_profile.php | 78 - .../create_cluster.php | 92 - .../create_instance.php | 106 - .../delete_app_profile.php | 72 - .../delete_cluster.php | 65 - .../delete_instance.php | 65 - .../get_app_profile.php | 71 - .../get_cluster.php | 67 - .../get_iam_policy.php | 67 - .../get_instance.php | 67 - .../list_app_profiles.php | 75 - .../list_clusters.php | 70 - .../list_hot_tablets.php | 74 - .../list_instances.php | 67 - .../partial_update_cluster.php | 81 - .../partial_update_instance.php | 86 - .../set_iam_policy.php | 70 - .../test_iam_permissions.php | 74 - .../update_app_profile.php | 70 - .../update_cluster.php | 85 - .../update_instance.php | 78 - .../check_consistency.php | 72 - .../BigtableTableAdminClient/copy_backup.php | 114 - .../create_backup.php | 108 - .../BigtableTableAdminClient/create_table.php | 76 - .../create_table_from_snapshot.php | 107 - .../delete_backup.php | 71 - .../delete_snapshot.php | 77 - .../BigtableTableAdminClient/delete_table.php | 66 - .../drop_row_range.php | 68 - .../generate_consistency_token.php | 71 - .../BigtableTableAdminClient/get_backup.php | 73 - .../get_iam_policy.php | 68 - .../BigtableTableAdminClient/get_snapshot.php | 79 - .../V2/BigtableTableAdminClient/get_table.php | 68 - .../BigtableTableAdminClient/list_backups.php | 75 - .../list_snapshots.php | 81 - .../BigtableTableAdminClient/list_tables.php | 72 - .../modify_column_families.php | 75 - .../restore_table.php | 90 - .../set_iam_policy.php | 70 - .../snapshot_table.php | 104 - .../test_iam_permissions.php | 75 - .../undelete_table.php | 80 - .../update_backup.php | 76 - .../BigtableTableAdminClient/update_table.php | 70 - .../src/V2/BigtableInstanceAdminClient.php | 34 - .../Admin/src/V2/BigtableTableAdminClient.php | 34 - .../V2/Client/BigtableInstanceAdminClient.php | 932 ------- .../V2/Client/BigtableTableAdminClient.php | 1078 -------- .../BigtableInstanceAdminGapicClient.php | 1763 ------------- .../Gapic/BigtableTableAdminGapicClient.php | 2112 --------------- .../v2/Admin/src/V2/gapic_metadata.json | 257 -- ...bigtable_instance_admin_client_config.json | 131 - ...table_instance_admin_descriptor_config.php | 329 --- ...able_instance_admin_rest_client_config.php | 318 --- .../bigtable_table_admin_client_config.json | 151 -- ...bigtable_table_admin_descriptor_config.php | 391 --- ...igtable_table_admin_rest_client_config.php | 378 --- .../V2/BigtableInstanceAdminClientTest.php | 1892 ------------- .../Unit/V2/BigtableTableAdminClientTest.php | 2138 --------------- .../BigtableInstanceAdminClientTest.php | 2070 --------------- .../Client/BigtableTableAdminClientTest.php | 2332 ----------------- .../Google/Bigtable/V2/Bigtable.php | Bin 9610 -> 0 bytes .../GPBMetadata/Google/Bigtable/V2/Data.php | Bin 3798 -> 0 bytes .../Google/Bigtable/V2/FeatureFlags.php | 32 - .../Google/Bigtable/V2/RequestStats.php | Bin 1347 -> 0 bytes .../Google/Bigtable/V2/ResponseParams.php | Bin 906 -> 0 bytes .../src/Google/Cloud/Bigtable/V2/Cell.php | 163 -- .../Bigtable/V2/CheckAndMutateRowRequest.php | 382 --- .../Bigtable/V2/CheckAndMutateRowResponse.php | 71 - .../src/Google/Cloud/Bigtable/V2/Column.php | 118 - .../Google/Cloud/Bigtable/V2/ColumnRange.php | 220 -- .../src/Google/Cloud/Bigtable/V2/Family.php | 122 - .../Google/Cloud/Bigtable/V2/FeatureFlags.php | 200 -- .../Cloud/Bigtable/V2/FullReadStatsView.php | 137 - ...teInitialChangeStreamPartitionsRequest.php | 160 -- ...eInitialChangeStreamPartitionsResponse.php | 78 - .../Cloud/Bigtable/V2/MutateRowRequest.php | 236 -- .../Cloud/Bigtable/V2/MutateRowResponse.php | 33 - .../Cloud/Bigtable/V2/MutateRowsRequest.php | 204 -- .../Bigtable/V2/MutateRowsRequest/Entry.php | 112 - .../Cloud/Bigtable/V2/MutateRowsResponse.php | 119 - .../Bigtable/V2/MutateRowsResponse/Entry.php | 130 - .../src/Google/Cloud/Bigtable/V2/Mutation.php | 174 -- .../Bigtable/V2/Mutation/DeleteFromColumn.php | 157 -- .../Bigtable/V2/Mutation/DeleteFromFamily.php | 74 - .../Bigtable/V2/Mutation/DeleteFromRow.php | 36 - .../Cloud/Bigtable/V2/Mutation/SetCell.php | 196 -- .../Cloud/Bigtable/V2/PingAndWarmRequest.php | 148 -- .../Cloud/Bigtable/V2/PingAndWarmResponse.php | 33 - .../Cloud/Bigtable/V2/RateLimitInfo.php | 159 -- .../Bigtable/V2/ReadChangeStreamRequest.php | 412 --- .../Bigtable/V2/ReadChangeStreamResponse.php | 142 - .../ReadChangeStreamResponse/CloseStream.php | 179 -- .../ReadChangeStreamResponse/DataChange.php | 439 ---- .../DataChange/Type.php | 72 - .../V2/ReadChangeStreamResponse/Heartbeat.php | 149 -- .../MutationChunk.php | 136 - .../MutationChunk/ChunkInfo.php | 144 - .../Cloud/Bigtable/V2/ReadIterationStats.php | 179 -- .../Bigtable/V2/ReadModifyWriteRowRequest.php | 242 -- .../V2/ReadModifyWriteRowResponse.php | 77 - .../Cloud/Bigtable/V2/ReadModifyWriteRule.php | 204 -- .../Cloud/Bigtable/V2/ReadRowsRequest.php | 382 --- .../V2/ReadRowsRequest/RequestStatsView.php | 67 - .../Cloud/Bigtable/V2/ReadRowsResponse.php | 233 -- .../V2/ReadRowsResponse/CellChunk.php | 560 ---- .../Cloud/Bigtable/V2/RequestLatencyStats.php | 135 - .../Google/Cloud/Bigtable/V2/RequestStats.php | 81 - .../Cloud/Bigtable/V2/ResponseParams.php | 128 - .../src/Google/Cloud/Bigtable/V2/Row.php | 114 - .../Google/Cloud/Bigtable/V2/RowFilter.php | 990 ------- .../Cloud/Bigtable/V2/RowFilter/Chain.php | 78 - .../Cloud/Bigtable/V2/RowFilter/Condition.php | 189 -- .../Bigtable/V2/RowFilter/Interleave.php | 159 -- .../src/Google/Cloud/Bigtable/V2/RowRange.php | 183 -- .../src/Google/Cloud/Bigtable/V2/RowSet.php | 101 - .../Bigtable/V2/SampleRowKeysRequest.php | 148 -- .../Bigtable/V2/SampleRowKeysResponse.php | 137 - .../Bigtable/V2/StreamContinuationToken.php | 113 - .../Bigtable/V2/StreamContinuationTokens.php | 69 - .../Cloud/Bigtable/V2/StreamPartition.php | 82 - .../Cloud/Bigtable/V2/TimestampRange.php | 101 - .../Google/Cloud/Bigtable/V2/ValueRange.php | 183 -- .../BigtableClient/check_and_mutate_row.php | 71 - ...erate_initial_change_stream_partitions.php | 77 - .../samples/V2/BigtableClient/mutate_row.php | 75 - .../samples/V2/BigtableClient/mutate_rows.php | 82 - .../V2/BigtableClient/ping_and_warm.php | 69 - .../V2/BigtableClient/read_change_stream.php | 77 - .../BigtableClient/read_modify_write_row.php | 79 - .../samples/V2/BigtableClient/read_rows.php | 77 - .../V2/BigtableClient/sample_row_keys.php | 76 - .../Bigtable/v2/src/V2/BigtableClient.php | 34 - .../v2/src/V2/Client/BigtableClient.php | 468 ---- .../v2/src/V2/Gapic/BigtableGapicClient.php | 956 ------- .../Bigtable/v2/src/V2/gapic_metadata.json | 63 - .../V2/resources/bigtable_client_config.json | 61 - .../resources/bigtable_descriptor_config.php | 198 -- .../resources/bigtable_rest_client_config.php | 116 - .../v2/tests/Unit/V2/BigtableClientTest.php | 696 ----- .../Unit/V2/Client/BigtableClientTest.php | 786 ------ 253 files changed, 40 insertions(+), 49532 deletions(-) delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Common.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/Table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/BigtableInstanceAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/BigtableTableAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableInstanceAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableInstanceAdminGapicClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableTableAdminGapicClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableInstanceAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableTableAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/FeatureFlags.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/ResponseParams.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Cell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php delete mode 100644 owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/BigtableClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/Client/BigtableClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/Gapic/BigtableGapicClient.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php delete mode 100644 owl-bot-staging/Bigtable/v2/tests/Unit/V2/BigtableClientTest.php delete mode 100644 owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php diff --git a/Bigtable/metadata/Admin/V2/BigtableTableAdmin.php b/Bigtable/metadata/Admin/V2/BigtableTableAdmin.php index e73bc0d7bd31680e5a8116a440f11b0c2357abcb..22db15898c0324b44c15f3287ec460e01ef0db3a 100644 GIT binary patch delta 71 zcmV-N0J#6!V)$aP@dO05SPCkpAQO{651}3s910IAOR={LIdDI0khx_dLezn7eoL6 delta 39 vcmey7bSr7YM;4ap5nRTT53ovZ=3|xQV!6-6B|W)UL3*+q|E$gb_^T8FE>sQ( diff --git a/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php b/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php index cfa87f00ca66..9199bd6b5649 100644 --- a/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php +++ b/Bigtable/src/Admin/V2/Gapic/BigtableTableAdminGapicClient.php @@ -1600,6 +1600,8 @@ public function listTables($parent, array $optionalArgs = []) * @param array $optionalArgs { * Optional. * + * @type bool $ignoreWarnings + * Optional. If true, ignore safety checks when modifying the column families. * @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 @@ -1617,6 +1619,10 @@ public function modifyColumnFamilies($name, $modifications, array $optionalArgs $request->setName($name); $request->setModifications($modifications); $requestParamHeaders['name'] = $name; + if (isset($optionalArgs['ignoreWarnings'])) { + $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); + } + $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); return $this->startCall('ModifyColumnFamilies', Table::class, $optionalArgs, $request)->wait(); diff --git a/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest.php b/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest.php index ebb617bd500e..e7d4d8ff7bd4 100644 --- a/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest.php +++ b/Bigtable/src/Admin/V2/ModifyColumnFamiliesRequest.php @@ -33,6 +33,12 @@ class ModifyColumnFamiliesRequest extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; */ private $modifications; + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $ignore_warnings = false; /** * @param string $name Required. The unique name of the table whose families should be modified. @@ -70,6 +76,8 @@ public static function build(string $name, array $modifications): self * families. Entries are applied in order, meaning that earlier modifications * can be masked by later ones (in the case of repeated updates to the same * family, for example). + * @type bool $ignore_warnings + * Optional. If true, ignore safety checks when modifying the column families. * } */ public function __construct($data = NULL) { @@ -139,5 +147,31 @@ public function setModifications($var) return $this; } + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIgnoreWarnings() + { + return $this->ignore_warnings; + } + + /** + * Optional. If true, ignore safety checks when modifying the column families. + * + * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIgnoreWarnings($var) + { + GPBUtil::checkBool($var); + $this->ignore_warnings = $var; + + return $this; + } + } diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableInstanceAdmin.php deleted file mode 100644 index 61328204bb8effc6c537611a17f21bee2d02a252..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10454 zcmcgyU2Gd!6=ssQn_TzzZqjDmQl`_=q*-U&y1Q+6vgzXdG|iGWCQT!;vSdx{i8Ium z8D_@mhNUZk03j_BLgj^(cmshDJi{AL@K6K~i+BkWa*C64^_R z4H21>g>@woBnVJ>#qtf;(i`PP!>hWcG79evld-NB}=8yrS`8!7T1AOn)X;MM<|SM+9i^I94Hm23da-oP^lowjOQb+=_% zrd2PmIi%tS%S-?`NcU3H@dvOtm`byBPxl`6?`<%5!-QJ(^`_H#F0GH5+a|AuVyzZ{ z{|=DHQ~*~3-bwV0yXeNjSOZV6d8%L=l~KxWA$x{v)EzTlr66WRll@F&V4EPdvc;jw z1zw2=xEzmss65HX#QQ>a6Qsr^&vQXjZ{~Ne<>6n&q1fW%+4y*D>>?j)geb||0ZO=n zvs}pG+>cY2Em83$l(E&=E&> zffXhsS(+N1zy8DAq$=gYeya+^d+O};|Y`z5v!QB zi6N?K7&PHG(1;kB7>2Ji1%)eV&$23Po2OGZ&`7n>@_>WAi9_-*Or7gKwWD+D0-wKR z`R*Ronq5c7V&CEn8h&K#G4JtJba+>9v<&J(rf?zUg-o?JbW2jcfbg>63+qK>XVD?D z3i7zl(72W-(PstP7`PJ=6-pEvjjftqpwtsuUr4?%LJs7!;@gi5i=|8XnuNv^Z}c2k zVGR5_8WlP8z#Ec@K9UHaIJvC@LDVV@yUI8bUNt;5iqD`EmhrA%iP%7}F{*r5Lgz}l zOBVHq4s;A{XpO>&;I%JH7@S^1nHJSqA%(*eoD~Tcm7@kkN@pn>XnfIV810rkUv_^Y zp)m$o4n~pQxkNb*2pb43bW*fv5`}mZy~GE29rngHi@+K>1>jDYsl~9Jqu9QTE~P@7 zt59~(%LHfqF#z`Sdfo}s@3SHbU&Rr9Jwh!E(7mH^5InD=F@~NO7{1?1=yaUzM0<@_ z&`H}h>n8N96_@clWuHtTFK{k06fCW3T$jM%RdkeVsF1a!Yq{_;tQJS?o0zDOR1@G&&Huy(Jsy0ig;!}PIue_?5L z6&?>|8z>VAMZC{gjrSQn8=C~8Sd4`qvq)k}s5F^H5uXl%7jBvQooIjQCNa$?JIF2mG%$?r3c%C-q4-z`V z2&L#afSYaT%LLUw@4|Z)9oHSF;xMg=w&OO+L*W8Eb? zY(h)Y)QIvBjX_%yiih4ryY4*gOs=5vq*(YmcHN;G<$ZLTbSL3AFRVd1g+^(^OGu9f z;xO*ivwRy;)n)@sp+Qsw2pnvFzM5kpMoijQ^IhFI42UzK-`xl z&w*p&L=q09Oh=SmbcS_W?Uv5Pdewmu0V`J9J4xV1SbLmB6Uh*Xl~CE|TdKRZPgepz zz|xzEHh-WF8mkDwD(L$Cwq`jrVpz34`!XEEDJixjP7lL(qsk*zC{f=yN^haejt$0< zKEM|sz1Y3x0~K8{TKL@sG(OKyjl~w3o(*G&@$q;IiwA9Xv!52WMb2o{;3Q9Z_v?TB z`_rMz$^~-n{hmWlOXh&?$kB(FpMH`LcE_4Dy@(O5%nxq)V-V~gNC<@oGx${zw~o}nCkw}VH=D{Vbxy_1xfJjO zo<%s~=Mp+fN}0db!!zBji^>W6dN7Jm3%@VX6G~++W^5Zlbk0P`6~6$aFi3OFxOaeh zRpC3-q-)uM;s<;YPkqd)Aoc%()59302(u5iS?T4+#cH?pEOU_aRTQ^R%>zjtL52bz>Kf_UVDLC5Yxv5;~dOT;Xfo5ucP5 z#`V=bD?2n9x0QT9tOL6RzT5M(=tgY6c!85oWIsU&DDsGZ4B?LLvC_gF6CBK=+pJVD z^C*pKBJM=k=2sFrL0F_1I*YG%4}U^b*qV~Cwi%puJ{L2*2kk^`51Hp*RDPp^xTE!8QA>0W7or!3P7xZO>BHnb}9^oH?^Q=lE;wfoJ z$_nSZ6*b4z^g(g;6jm|PR*Q=SVFL+20IR##)aalvW?TS|%dpD?%3TVTn@WKuK>V!Q zt=A?uOoG?aO~r_qfty4S z!j&Er6sleqZOq#=9kck2-qaplVe_!t=I09mvt&OUepWmudcjVIULO_zJ+$Ndj;H1G zj~_qgaSwjl*IWKhaLJ2pGjoH9t75eua9Xhc=rxbtP?!-u_Gx3MNqt+&COZw?-?rUm z&v?YeRk(jqo3X9N-u&O-$Q$lY2&~6lP4A#6S$HM{%4I514lnHSds%R0 z@1H{o)1qlqNYjKKO{0o5ZL_d-gc@~yGPom@V;A5e_vOg%IcBxPT{$Yr?zBBYPZ0Va DkC6;e diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/GPBMetadata/Google/Bigtable/Admin/V2/BigtableTableAdmin.php deleted file mode 100644 index 22db15898c0324b44c15f3287ec460e01ef0db3a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12664 zcmc&*U2Ggz74ABTYu|PLZk)t%n`An5TGw@En+<7`aZR&pH%?H~n8b-tS-KkU&aQ{- z&I~iNc1;zbmM3_q1PH18JXBQ?2*d+INJy1<0r3zCkl+RR0V;tIs^E#YN=Tf0?!B`! z-ksT9J1u?jcJI08o}cgh+_N{&zu>O9GU!>TBLU?dy75r#6eEjSCIS zw1dI+T(QhXwP>yx>z3mUw)Lhd0MxgT()l4QN()Z2>Dc|B+sOfe)IWo3MzeJ1TnYXx zJAk*%fp-qN?Ip*qdoA0x?0V^j%R+T9$A)-aZ1KJQOB`+mpuO01g8`Hcw<12S8~)uL z9J^vciU^FR+kG!a=GjkMA`T1HY8ZA`AYo01fx^P(N%D)&k@GvqRCI!G(pE)I(s&wM z&rco~>3v2;c($>ZAD6cRCDU64&Bl3}hD zRHp=$Wi)f^=W_6;>>_N%`eb}Pw)VJKYqSBFb3y=aJHQoLF;^8R6YGx%CgHlta3mIG z;RqMGt(t%qK_LwpQUnqboIw3qh8%%B0=d`3K)z{ysRjQ_=gF{Zc#zE|GD>E8w0QP| z!q7*B(v#$jv@7=_7Y`ihYhd2oH5>2-6@VTkBWTC6Rh<|@4tszD)yeRxQMuc4C-&f% z(;pSikjGP57LoqyL&Xs?%=4Z4_7EA53N5Q29V2^LS>!U)%OuM;l!HyzL@^HJpVqj@ zop96y%Uf8LS6~aBBUvsk)WVvBGH3Hs$sD+>*MRowL-Y(e>9}BTsGp*Khu$xvlzW*8 zz|te&ojRb{pV$ZAWYa_p6WFrYQrsUZ$wX8e_bcmKb%hX14>gw#C?Vw5PeM9cN zIvY0)yKYLkFGl03ID_~pJvG6mn=U(zP^-fxA`eg_O4szhDZu2A&tjscYu~2 zCZn!VH_JXmG@vLmy^m5t@TZ^oC<@H_YBTbqk!vSl#eLxMvUoZ61Sk!ROhDt!5^FkRfBp zPwatAFa*60c1!dk8LnVi6tH_DS*D0pHX%F0P96|=RyN=N&I4p`6;e1RCYC|>kv(7@ z_4DMk?CKXF5kVp~?aJl~%U8Px?K}y`ADzra;yXbOSK0@cd8R}&sXjTrux3{7M)vMn zCVHyddF>Wd)yPEWp+Z)0Vkj%`d`HxOWXQNIln*8{q2+tH(rAGvJjBOnaTY7<6J$za zwrg{}!1q9H&B}Vu+H2lPW3%%F*%Jf}gg`cbLV_+#qw)qzkC1Ft3|-(djBV$r`dLDu zu1Hm-Bj#c)z@UxA>tvkOLdi6Y`scS@F9tI}tPnHTb}z(ra&+6_!p#@Rs5GD~$Eq}z z^gugnNa2$!@(MZ1Yk?$vFvj~0Byh{I)z!#^i08^{G5F(RdTpvn`4>QLIHy zZ=&7|8@ags+M4oavOi7f&brC#5JiLmN8<}By`Y<`a z{td2x3y!-Px9G{l-EHZz;I~3=33A>;?<*P9Pl{(9k{uzWf-N;#-P~u zzzn8eG^Pk2VeuhP%6*sHn2oSvlPMngDZ{gl$yEN`8A6L<=8H84e{G^a$&hR$bJN-6 zEEXXXnRT+)wOPIX=AZult)ZMc!+t+|ozF1mp#%D&Sqc2yOwJM$O89&)7vPOt&&+HU zj&jmj{0iDC{(*jd2zu1^geyASp*t>3lP9Ilk=d{oT2TFV29+qP^8+YRK`EmGqF$%B z>$PoSbiXi7_Mv-d&no?1hLHAXgQlRNO(h+d;^rtZ&mQU=8eoWQ0l@#67CmHNxLRYXZ`^F zTDM6By&#R&3FU6|Qmvk_E~8?L>I(xX2BU?Jkq#jF-ov<7Ij_S(7N8 z)F25hMHKvb^|=8AXEPEx<_3Z3KQm+^X+T0RCCiz#N6M`4WUI)2w^6UF>cRke)x|TE z$SehiJZ{1PLS;^vYO zx{Y37?OIIs)D{q)9pD@eyTMTWb}IoF`~&gP4owj!PATP2%3i|6GrKnN2asNQkII|( zwDcOKlLGbt{u>cdK)Y`E_f8^zXmVx)=fy6Qskm^{R_H^f-dFxt$<6A z+UIqZx9twfSwy=&`h8Za@prA>T14rj7D-?iMxNQFk$(<}j|Dv!&QD8x5i%)UibrD9 zB9HI@mB1Jn_w6hKIdClcUL`F+qjXa49s&9V#Km)JzIS|vS6+B-!ruHqUAkX5DI3!6 zk81u6x4!mVBJI}Krs`AjZ_3od+k$~jtXE(vgtc|1BeleaAG48p47=ILY}0Mv@-Off zq>=E2A`R;$Jpan*9>_S z9!^Tw#TC%j^Tp%EjuGlIdn>w}d1YR_WUM<4c(kQCUOfl5K%A)L+V3($^M?;%=g^Tq z9y+yz|5!jwLAIylAu&Vic`8R`0+ h{OT|Yb^gilMe!_us2_RPpZKO9Df!#`d*mJ={{sdaj;pNnaBX{CIF{P=6p^B;K(up zz{#4Xl7tkFy}>)GNklXW#R__UL4GwE&yRd(i9FY3HSn_d1SUsSO`;1w0WJd zbip{&j3n%{anOS+lBCp>9%5G+4>c1U<^@w8()JlFICJcY6vlB6?&NrR6HEhw3D;C{ zk_0YIL&c;P$}>=mW2(#6OR}DP-uUR%*1q|&*j_ku{N3E?pkD(=LTTNj<; z7m+MIT$HYD-?!@Hv0Vl*;S^n*j98#O)Wr~5nKIepG&pS!PJxF_vX zn|gXc2U3431+S^(dQRXNjwSUc!y)w~!x_7#MLk)P_L@?o*_CR0_3m9%^__`lP(>O! z&d8$WzBvl?J}&gZ*tE;Xm9lC3fo>aA<~9LreN25kAVsvglmALxPJ+vn=Ns!;E# zOuhHKvJGHZy6;PMVFuoUgn#a&Z<&UKrUU$U-}E)pHUm?)%y01)JJL|Me2U5!Wrq{n z2u#P8m_ic|w)IE~Z8F*Wu7kJUk)i{&7!U|TuWkp_vvsStM}5OH-N5l$D5@wU8pQCi zovla0Ei-2hrLFLcigMwQJ5u0H=)8AH@@O#e>}`H-W?&YtdY8bZx@PaGNv%PZzSfUT z$5WKkTb&wNq}rw;dP{3vh)-|V8IK)%dA~8BT@!f_=wtVCT^@+XPfP*3IvB(#KSd^P z#keq(HsOaqKyPzN4w6DBC`V+KIa%f7O7XTZp}S_;6X=A*Ek0Oi9g_ng5Mmz)G0t`* zPC1C~848qsSbK>ARLb)%b3b?N(Dis!8%!NHZSMLJIfR zD_ioSE69;;xx?hir?3)CU0PV-dcDmh6uT%-p1`W5_o?L<(o$+GSCN-cJmd;BJMgCD z6UZ4J#S>@@fWlRDpQ{ujBM~}s%mQ}J6!`$we9UNnXi{Huzx4|l)XVU12UosNB#MtA zH}53}sjul&z_$kJW8Iq20>@2B{w-1Z6w)CKH{g1wt9EM|)-LUfM)O4@e}!Zr-L9#7 zFY^fuL}nM)-Fjm`pDgXb3J2jPAuLtY&e|#645g zy;(I6>)IJ`N*WM#5;(qrWzQaUbq{Nij~KpZxD#y>m{<%EOvlz-iZ$8}I525~x#MH` z(ns`+(8%mFLCtmsAHk;Z>aI2Mv6i0W{x)PR$Kb~e<5zw3qniF%y$5%reP6IA2JuiRknOYC@h+AN?_qX? zq`LvR`OC0ONs~IP8{t7U!?B0vNKm*OQ8)^3Ts-8+wD`Zv)ef$Z1GqV$Lw#ZeT7)}K z$uv4zuRK_6uoFg!QIVZAP1>+QZNreJ_`+e2Hwtr_V5$v7|AcjkKW14ng7?Rm9Hu60 zYo3F}%N}VHpK7{2#TSSL?#bf7oqCs#m?d$)c4+6BPgQ%0iTF>r<)dATp7&G;bLj6& zdFXHxXI-H28f07#TQD=2@=~#0dAyXlmQboD3yFgS=>oxr-X7@QKr?;E3M*ocBk-4{ z4B~^w)$5V=L8AC)xV;b<7L*8ibHIvuYAai8z|G4pN(gJnc>&kVfp~aJP}D8U`9=#o z-S&0fUh9_j4Prrk9{EhM3mX>>Mn0dzjOER5#jNxSG7)~H05@Chdb3^czC8C}=iyrX z<*@kzpKNRg;+-QLWu6`7lVk(d;?0Bl{y{#aI47!wjpaL&>6Cm#T{fTeI9)KM@P~$q zEP41VAJN}+aKxEbbC8XRQ2IUv*#jr&vKcElmufh7@Y!p=dF*Zetlo#xJ1@YEk&gk8 zcwP|pYpl&&qF?(6GSnV~D(u}{LS+N8p&!<`vCPh519g>IVH+$Fv*aG!VqJ*F`xu`! zDp3c+`p6`!{wd|V6ZK#4@SQh1MXJ4QWCXeADqZ!_EMgqMam*}0&(_)~;iTWg23auy#7gChSj-qfwih@Gw8@T(cuNUcDf@<8Y zmET6oSs6py#a88~ZtC2uB_Fpnm MbIEY=M={sMSI7(Gn5rD|3c2KzL+&{wC!hTYsT|TX1Mo*8CAp%DhQM^spuexb?wN1C zbv zcS6r3lGt;cUY`_BtX^Q8;K1k(EW2=CEU=$><`BR(2E=y_lZcgi>5v3Q*9eSGh1qsW zk!?q&wwO^?}?{I-zR8! zdG2Xwn}OxnA~mSlCfWH^)Af9dXJNv{pJ3;d_*%OPkyi11}`gtBayXg3z;f*}kcR(RkFE6D!%ZItLc% zcT42VIJX>6k|tj@ak9v?K_c94Y&8zYeuzxLDBgU*v1!Xf^aEqy-rTm~nw=&>9s2Wa z7;2yY%8D?OyWKG)2T0hRaS&-pKY>4q@Z=^;6}I@Se9Y%O<8%JJxcwlqH(aaWMPcOh z-u@_h#mJ7-DRiS)MeiS7d>_OCi6-2SCU~w{pyUaC{v!9s1Y{61q#jZ2Q%CqUWH^9& zFm%aQLQL$e7k`%L=9f2}k8GPPSzBl#>_XP2IH!V8J~QkdX$BrK24%-SwR*yH$RekSP06CW#Iu|(+i0fvAYLX8R6ZtE?%%7B zX4x*R!4g#qX0j^OVBPG8K4zj$14De=aSC@_j9py;fc*9cat(+37 zuz~s(4s89@7+8G^J*Jq)=hu23N17_6^SphFePvk1wzDG|q?0#Fp+Z zjrgu1w^EgaMvR)YBZAx4p+p`y~WF3Mhi(h_QK%fA9es6#5TR5%eE7d zmr`M8v2$f?KncwJ zFpDmcRmec<6&XfZunXyPqaTteU9Uj#ayX^r*NN>PV6!}jzB7ybVs??AE)MIIt08rd zLU3;$r-i5RF@C6mp*^hYm4>Xft8zna9qVnaSy#&HfvW6dpaGT-)oN93W)r#J!P1dM zeotd{q$=NCn0W_QHTh7{Yg+Xf@z{V&v;0Cilyy26abOXySJkrIQfnH2nxg0`TDftI zQI8*{g%wyjXjiM*B}soLcRG-Zm4qukmsAvcKaWjNfosz*QMi7KS>PAmM59r`vQe0@ zslaFPaKxJ*d=k(GW|WgLRVLvd3SYqOo~e6bpUYgPC@v0m#cbfb+&`1B%!k4@WCzA; z-3|x(Iq`gyS)cJF{oPMNKVj}VRb(_hv)+jPUH(xl?kCeqcp70(!i`2zgiraSr_@qPg-=jfED2`8S4>~$Iy==Cd7`h0mxI$3w>^* z!p5tCucH#gP%{ZwE&Uv8*?;8EV8`q`VHf8_9>#<%Q>AoXlHn1j2qxClcd}OC5qvn6 z7OmsDav|G(0uL&+TBWM!`^tgbuD0~ae9S(yFSnbm+M&`wIn?9|%Hq_7WbSPWR+_fq z`e#mXp{`4?7B@09MIvE)6vrXX#c}(^t2z(LL)f6l2i?ccUq2brrhwv;;%~o%jERLW zAUf@`q5yBlj>nzHSg*KM0Wz%AMOJB+2v=AM-#{AkJ|J7PM6X{}gyIM=U?VPU(&hN6 zg67R_^s$;l0cQ1Xel;4`kpzZvrHqB7MT=5Wdh3qtLt0v0u0C}GiP zRPZAt@mV|^<^H+^%e+Or0Pw>(0I!yovB`NWCsD%gMDX)wbPH$%#sHGnu7xcS1CVRd z6;M#CBzB#EczD5kq5cJ|5WCAwu7#ZM?mn(F;T;7(;++%|f`Ykzl?d{9P19jcZ$q1` z_wH>_h&h8kfV;e(nJu)_#7Rs#lcW^BlRbERC5IxEU;ZBq;#ebp_+XU#TLOUlrTrQ5 zewn}FZ4VFlEU^5%at#|&SYRi>-iSacY~f}ViT3glBd=iVXZvvX@*(RnJZfOqQ)?)C zv(|2u6@8AnV%JlW%P-sYY@+nvBs|16BUY&xh_U>YfHfd>dN)x|e7_eR_lJ#$X4+PmG%lAfWp)d`#=+)bpqk&b*Gx>gZ&dh41+%google.bigtable.admin.v2.AppProfile - */ -class AppProfile extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - */ - protected $etag = ''; - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - protected $routing_policy; - protected $isolation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * @type string $etag - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * @type string $description - * Long form description of the use case for this AppProfile. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $multi_cluster_routing_use_any - * Use a multi-cluster routing policy. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $single_cluster_routing - * Use a single-cluster routing policy. - * @type int $priority - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $standard_isolation - * The standard options used for isolating this app profile's traffic from - * other use cases. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the app profile. Values are of the form - * `projects/{project}/instances/{instance}/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * 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; - } - - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * Strongly validated etag for optimistic concurrency control. Preserve the - * value returned from `GetAppProfile` when calling `UpdateAppProfile` to - * fail the request if there has been a modification in the mean time. The - * `update_mask` of the request need not include `etag` for this protection - * to apply. - * See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and - * [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more - * details. - * - * Generated from protobuf field string etag = 2; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Long form description of the use case for this AppProfile. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Use a multi-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny|null - */ - public function getMultiClusterRoutingUseAny() - { - return $this->readOneof(5); - } - - public function hasMultiClusterRoutingUseAny() - { - return $this->hasOneof(5); - } - - /** - * Use a multi-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny $var - * @return $this - */ - public function setMultiClusterRoutingUseAny($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\MultiClusterRoutingUseAny::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Use a single-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting|null - */ - public function getSingleClusterRouting() - { - return $this->readOneof(6); - } - - public function hasSingleClusterRouting() - { - return $this->hasOneof(6); - } - - /** - * Use a single-cluster routing policy. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.SingleClusterRouting single_cluster_routing = 6; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting $var - * @return $this - */ - public function setSingleClusterRouting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\SingleClusterRouting::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; - * @return int - * @deprecated - */ - public function getPriority() - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - return $this->readOneof(7); - } - - public function hasPriority() - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - return $this->hasOneof(7); - } - - /** - * This field has been deprecated in favor of `standard_isolation.priority`. - * If you set this field, `standard_isolation.priority` will be set instead. - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 7 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setPriority($var) - { - @trigger_error('priority is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The standard options used for isolating this app profile's traffic from - * other use cases. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation|null - */ - public function getStandardIsolation() - { - return $this->readOneof(11); - } - - public function hasStandardIsolation() - { - return $this->hasOneof(11); - } - - /** - * The standard options used for isolating this app profile's traffic from - * other use cases. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.StandardIsolation standard_isolation = 11; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation $var - * @return $this - */ - public function setStandardIsolation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\StandardIsolation::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * @return string - */ - public function getRoutingPolicy() - { - return $this->whichOneof("routing_policy"); - } - - /** - * @return string - */ - public function getIsolation() - { - return $this->whichOneof("isolation"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php deleted file mode 100644 index a0b957de149a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/MultiClusterRoutingUseAny.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny - */ -class MultiClusterRoutingUseAny extends \Google\Protobuf\Internal\Message -{ - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - */ - private $cluster_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $cluster_ids - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusterIds() - { - return $this->cluster_ids; - } - - /** - * The set of clusters to route to. The order is ignored; clusters will be - * tried in order of distance. If left empty, all clusters are eligible. - * - * Generated from protobuf field repeated string cluster_ids = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusterIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cluster_ids = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MultiClusterRoutingUseAny::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php deleted file mode 100644 index df376e17c64e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/Priority.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.admin.v2.AppProfile.Priority - */ -class Priority -{ - /** - * Default value. Mapped to PRIORITY_HIGH (the legacy behavior) on creation. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Generated from protobuf enum PRIORITY_LOW = 1; - */ - const PRIORITY_LOW = 1; - /** - * Generated from protobuf enum PRIORITY_MEDIUM = 2; - */ - const PRIORITY_MEDIUM = 2; - /** - * Generated from protobuf enum PRIORITY_HIGH = 3; - */ - const PRIORITY_HIGH = 3; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::PRIORITY_LOW => 'PRIORITY_LOW', - self::PRIORITY_MEDIUM => 'PRIORITY_MEDIUM', - self::PRIORITY_HIGH => 'PRIORITY_HIGH', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Priority::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_Priority::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php deleted file mode 100644 index 5bd27b02ed0b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/SingleClusterRouting.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.AppProfile.SingleClusterRouting - */ -class SingleClusterRouting extends \Google\Protobuf\Internal\Message -{ - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - */ - protected $cluster_id = ''; - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - */ - protected $allow_transactional_writes = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster_id - * The cluster to which read/write requests should be routed. - * @type bool $allow_transactional_writes - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * The cluster to which read/write requests should be routed. - * - * Generated from protobuf field string cluster_id = 1; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - * @return bool - */ - public function getAllowTransactionalWrites() - { - return $this->allow_transactional_writes; - } - - /** - * Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are - * allowed by this app profile. It is unsafe to send these requests to - * the same table/row/column in multiple clusters. - * - * Generated from protobuf field bool allow_transactional_writes = 2; - * @param bool $var - * @return $this - */ - public function setAllowTransactionalWrites($var) - { - GPBUtil::checkBool($var); - $this->allow_transactional_writes = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SingleClusterRouting::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_SingleClusterRouting::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php deleted file mode 100644 index 3638ebc75214..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AppProfile/StandardIsolation.php +++ /dev/null @@ -1,71 +0,0 @@ -google.bigtable.admin.v2.AppProfile.StandardIsolation - */ -class StandardIsolation extends \Google\Protobuf\Internal\Message -{ - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $priority - * The priority of requests sent using this app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of requests sent using this app profile. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile.Priority priority = 1; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile\Priority::class); - $this->priority = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StandardIsolation::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_StandardIsolation::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php deleted file mode 100644 index 87c9350253d9..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingLimits.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.admin.v2.AutoscalingLimits - */ -class AutoscalingLimits extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $min_serve_nodes = 0; - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $max_serve_nodes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $min_serve_nodes - * Required. Minimum number of nodes to scale down to. - * @type int $max_serve_nodes - * Required. Maximum number of nodes to scale up to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMinServeNodes() - { - return $this->min_serve_nodes; - } - - /** - * Required. Minimum number of nodes to scale down to. - * - * Generated from protobuf field int32 min_serve_nodes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMinServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->min_serve_nodes = $var; - - return $this; - } - - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getMaxServeNodes() - { - return $this->max_serve_nodes; - } - - /** - * Required. Maximum number of nodes to scale up to. - * - * Generated from protobuf field int32 max_serve_nodes = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setMaxServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->max_serve_nodes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php deleted file mode 100644 index 4825251531fe..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/AutoscalingTargets.php +++ /dev/null @@ -1,133 +0,0 @@ -google.bigtable.admin.v2.AutoscalingTargets - */ -class AutoscalingTargets extends \Google\Protobuf\Internal\Message -{ - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - */ - protected $cpu_utilization_percent = 0; - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - */ - protected $storage_utilization_gib_per_node = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $cpu_utilization_percent - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * @type int $storage_utilization_gib_per_node - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - * @return int - */ - public function getCpuUtilizationPercent() - { - return $this->cpu_utilization_percent; - } - - /** - * The cpu utilization that the Autoscaler should be trying to achieve. - * This number is on a scale from 0 (no utilization) to - * 100 (total utilization), and is limited between 10 and 80, otherwise it - * will return INVALID_ARGUMENT error. - * - * Generated from protobuf field int32 cpu_utilization_percent = 2; - * @param int $var - * @return $this - */ - public function setCpuUtilizationPercent($var) - { - GPBUtil::checkInt32($var); - $this->cpu_utilization_percent = $var; - - return $this; - } - - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - * @return int - */ - public function getStorageUtilizationGibPerNode() - { - return $this->storage_utilization_gib_per_node; - } - - /** - * The storage utilization that the Autoscaler should be trying to achieve. - * This number is limited between 2560 (2.5TiB) and 5120 (5TiB) for a SSD - * cluster and between 8192 (8TiB) and 16384 (16TiB) for an HDD cluster, - * otherwise it will return INVALID_ARGUMENT error. If this value is set to 0, - * it will be treated as if it were set to the default value: 2560 for SSD, - * 8192 for HDD. - * - * Generated from protobuf field int32 storage_utilization_gib_per_node = 3; - * @param int $var - * @return $this - */ - public function setStorageUtilizationGibPerNode($var) - { - GPBUtil::checkInt32($var); - $this->storage_utilization_gib_per_node = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php deleted file mode 100644 index 6dbc78c186c5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup.php +++ /dev/null @@ -1,463 +0,0 @@ -google.bigtable.admin.v2.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - */ - protected $source_table = ''; - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_backup = ''; - /** - * Required. The expiration time of the backup, with microseconds - * granularity that must be at least 6 hours and at most 90 days - * from the time the request is received. Once the `expire_time` - * has passed, Cloud Bigtable will delete the backup and free the - * resources used by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $expire_time = null; - /** - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $source_table - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * @type string $source_backup - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * @type \Google\Protobuf\Timestamp $expire_time - * Required. The expiration time of the backup, with microseconds - * granularity that must be at least 6 hours and at most 90 days - * from the time the request is received. Once the `expire_time` - * has passed, Cloud Bigtable will delete the backup and free the - * resources used by the backup. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * @type int|string $size_bytes - * Output only. Size of the backup in bytes. - * @type int $state - * Output only. The current state of the backup. - * @type \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $encryption_info - * Output only. The encryption information for the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * A globally unique identifier for the backup which cannot be - * changed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/ - * backups/[_a-zA-Z0-9][-_.a-zA-Z0-9]*` - * The final segment of the name must be between 1 and 50 characters - * in length. - * The backup is stored in the cluster identified by the prefix of the backup - * name of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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; - } - - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * Required. Immutable. Name of the table from which this backup was created. - * This needs to be in the same instance as the backup. Values are of the form - * `projects/{project}/instances/{instance}/tables/{source_table}`. - * - * Generated from protobuf field string source_table = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - - /** - * Required. The expiration time of the backup, with microseconds - * granularity that must be at least 6 hours and at most 90 days - * from the time the request is received. Once the `expire_time` - * has passed, Cloud Bigtable will delete the backup and free the - * resources used by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The expiration time of the backup, with microseconds - * granularity that must be at least 6 hours and at most 90 days - * from the time the request is received. Once the `expire_time` - * has passed, Cloud Bigtable will delete the backup and free the - * resources used by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @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. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. `start_time` is the time that the backup was started - * (i.e. approximately the time the - * [CreateBackup][google.bigtable.admin.v2.BigtableTableAdmin.CreateBackup] - * request is received). The row data in this backup will be no older than - * this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. `end_time` is the time that the backup was finished. The row - * data in the backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Size of the backup in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.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 current state of the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup.State state = 7 [(.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.bigtable.admin.v2.Backup.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Backup\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo|null - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - public function hasEncryptionInfo() - { - return isset($this->encryption_info); - } - - public function clearEncryptionInfo() - { - unset($this->encryption_info); - } - - /** - * Output only. The encryption information for the backup. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo encryption_info = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo $var - * @return $this - */ - public function setEncryptionInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); - $this->encryption_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php deleted file mode 100644 index 1e7867d2bd8a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Backup/State.php +++ /dev/null @@ -1,65 +0,0 @@ -google.bigtable.admin.v2.Backup.State - */ -class State -{ - /** - * Not specified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The pending backup is still being created. Operations on the - * backup may fail with `FAILED_PRECONDITION` in this state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is complete and ready for use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Bigtable\Admin\V2\Backup_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php deleted file mode 100644 index 97b8b310985c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/BackupInfo.php +++ /dev/null @@ -1,239 +0,0 @@ -google.bigtable.admin.v2.BackupInfo - */ -class BackupInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $backup = ''; - /** - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_table = ''; - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * Output only. Name of the backup. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * @type string $source_table - * Output only. Name of the table the backup was created from. - * @type string $source_backup - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Output only. Name of the backup. - * - * Generated from protobuf field string backup = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The time that the backup was started. Row data in the backup - * will be no older than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. This time that the backup was finished. Row data in the - * backup will be no newer than this timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Output only. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * Output only. Name of the table the backup was created from. - * - * Generated from protobuf field string source_table = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Output only. Name of the backup from which this backup was copied. If a - * backup is not created by copying a backup, this field will be empty. Values - * are of the form: projects//instances//backups/. - * - * Generated from protobuf field string source_backup = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php deleted file mode 100644 index 49dbf3a36659..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ChangeStreamConfig.php +++ /dev/null @@ -1,93 +0,0 @@ -google.bigtable.admin.v2.ChangeStreamConfig - */ -class ChangeStreamConfig extends \Google\Protobuf\Internal\Message -{ - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - */ - protected $retention_period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $retention_period - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getRetentionPeriod() - { - return $this->retention_period; - } - - public function hasRetentionPeriod() - { - return isset($this->retention_period); - } - - public function clearRetentionPeriod() - { - unset($this->retention_period); - } - - /** - * How long the change stream should be retained. Change stream data older - * than the retention period will not be returned when reading the change - * stream from the table. - * Values must be at least 1 day and at most 7 days, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration retention_period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention_period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php deleted file mode 100644 index 840064b35fe2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.bigtable.admin.v2.CheckConsistencyRequest - */ -class CheckConsistencyRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $consistency_token = ''; - - /** - * @param string $name Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param string $consistencyToken Required. The token created using GenerateConsistencyToken for the Table. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CheckConsistencyRequest - * - * @experimental - */ - public static function build(string $name, string $consistencyToken): self - { - return (new self()) - ->setName($name) - ->setConsistencyToken($consistencyToken); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $consistency_token - * Required. The token created using GenerateConsistencyToken for the Table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getConsistencyToken() - { - return $this->consistency_token; - } - - /** - * Required. The token created using GenerateConsistencyToken for the Table. - * - * Generated from protobuf field string consistency_token = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setConsistencyToken($var) - { - GPBUtil::checkString($var, True); - $this->consistency_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php deleted file mode 100644 index 86e789432683..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CheckConsistencyResponse.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.admin.v2.CheckConsistencyResponse - */ -class CheckConsistencyResponse extends \Google\Protobuf\Internal\Message -{ - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - */ - protected $consistent = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $consistent - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - * @return bool - */ - public function getConsistent() - { - return $this->consistent; - } - - /** - * True only if the token is consistent. A token is consistent if replication - * has caught up with the restrictions specified in the request. - * - * Generated from protobuf field bool consistent = 1; - * @param bool $var - * @return $this - */ - public function setConsistent($var) - { - GPBUtil::checkBool($var); - $this->consistent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php deleted file mode 100644 index 4039b9ce2cbd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster.php +++ /dev/null @@ -1,315 +0,0 @@ -google.bigtable.admin.v2.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $location = ''; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - */ - protected $serve_nodes = 0; - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $default_storage_type = 0; - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $encryption_config = null; - protected $config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * @type string $location - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * @type int $state - * Output only. The current state of the cluster. - * @type int $serve_nodes - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $cluster_config - * Configuration for this cluster. - * @type int $default_storage_type - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $encryption_config - * Immutable. The encryption configuration for CMEK-protected clusters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * - * 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; - } - - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getLocation() - { - return $this->location; - } - - /** - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * - * Generated from protobuf field string location = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLocation($var) - { - GPBUtil::checkString($var, True); - $this->location = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - * @return int - */ - public function getServeNodes() - { - return $this->serve_nodes; - } - - /** - * The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * - * Generated from protobuf field int32 serve_nodes = 4; - * @param int $var - * @return $this - */ - public function setServeNodes($var) - { - GPBUtil::checkInt32($var); - $this->serve_nodes = $var; - - return $this; - } - - /** - * Configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig|null - */ - public function getClusterConfig() - { - return $this->readOneof(7); - } - - public function hasClusterConfig() - { - return $this->hasOneof(7); - } - - /** - * Configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterConfig cluster_config = 7; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig $var - * @return $this - */ - public function setClusterConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterConfig::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDefaultStorageType() - { - return $this->default_storage_type; - } - - /** - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * - * Generated from protobuf field .google.bigtable.admin.v2.StorageType default_storage_type = 5 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDefaultStorageType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\StorageType::class); - $this->default_storage_type = $var; - - return $this; - } - - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Immutable. The encryption configuration for CMEK-protected clusters. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.EncryptionConfig encryption_config = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getConfig() - { - return $this->whichOneof("config"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php deleted file mode 100644 index 997961367dd3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterAutoscalingConfig.php +++ /dev/null @@ -1,124 +0,0 @@ -google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig - */ -class ClusterAutoscalingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling_limits = null; - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $autoscaling_targets = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $autoscaling_limits - * Required. Autoscaling limits for this cluster. - * @type \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $autoscaling_targets - * Required. Autoscaling targets for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits|null - */ - public function getAutoscalingLimits() - { - return $this->autoscaling_limits; - } - - public function hasAutoscalingLimits() - { - return isset($this->autoscaling_limits); - } - - public function clearAutoscalingLimits() - { - unset($this->autoscaling_limits); - } - - /** - * Required. Autoscaling limits for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingLimits autoscaling_limits = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits $var - * @return $this - */ - public function setAutoscalingLimits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingLimits::class); - $this->autoscaling_limits = $var; - - return $this; - } - - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets|null - */ - public function getAutoscalingTargets() - { - return $this->autoscaling_targets; - } - - public function hasAutoscalingTargets() - { - return isset($this->autoscaling_targets); - } - - public function clearAutoscalingTargets() - { - unset($this->autoscaling_targets); - } - - /** - * Required. Autoscaling targets for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.AutoscalingTargets autoscaling_targets = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets $var - * @return $this - */ - public function setAutoscalingTargets($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AutoscalingTargets::class); - $this->autoscaling_targets = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterAutoscalingConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterAutoscalingConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php deleted file mode 100644 index b8856b291e62..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/ClusterConfig.php +++ /dev/null @@ -1,80 +0,0 @@ -google.bigtable.admin.v2.Cluster.ClusterConfig - */ -class ClusterConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - */ - protected $cluster_autoscaling_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $cluster_autoscaling_config - * Autoscaling configuration for this cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig|null - */ - public function getClusterAutoscalingConfig() - { - return $this->cluster_autoscaling_config; - } - - public function hasClusterAutoscalingConfig() - { - return isset($this->cluster_autoscaling_config); - } - - public function clearClusterAutoscalingConfig() - { - unset($this->cluster_autoscaling_config); - } - - /** - * Autoscaling configuration for this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig cluster_autoscaling_config = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig $var - * @return $this - */ - public function setClusterAutoscalingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster\ClusterAutoscalingConfig::class); - $this->cluster_autoscaling_config = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_ClusterConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php deleted file mode 100644 index 3294a44ba562..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/EncryptionConfig.php +++ /dev/null @@ -1,107 +0,0 @@ -google.bigtable.admin.v2.Cluster.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Describes the Cloud KMS encryption key that will be used to protect the - * destination Bigtable cluster. The requirements for this key are: - * 1) The Cloud Bigtable service account associated with the project that - * contains this cluster must be granted the - * `cloudkms.cryptoKeyEncrypterDecrypter` role on the CMEK key. - * 2) Only regional keys can be used and the region of the CMEK key must - * match the region of the cluster. - * 3) All clusters within an instance must use the same CMEK key. - * Values are of the form - * `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}` - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionConfig::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_EncryptionConfig::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php deleted file mode 100644 index fc392006912f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Cluster/State.php +++ /dev/null @@ -1,85 +0,0 @@ -google.bigtable.admin.v2.Cluster.State - */ -class State -{ - /** - * The state of the cluster could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The cluster has been successfully created and is ready to serve requests. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The cluster is currently being created, and may be destroyed - * if the creation process encounters an error. - * A cluster may not be able to serve requests while being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - /** - * The cluster is currently being resized, and may revert to its previous - * node count if the process encounters an error. - * A cluster is still capable of serving requests while being resized, - * but may exhibit performance as if its number of allocated nodes is - * between the starting and requested states. - * - * Generated from protobuf enum RESIZING = 3; - */ - const RESIZING = 3; - /** - * The cluster has no backing nodes. The data (tables) still - * exist, but no operations can be performed on the cluster. - * - * Generated from protobuf enum DISABLED = 4; - */ - const DISABLED = 4; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - self::RESIZING => 'RESIZING', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Bigtable\Admin\V2\Cluster_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php deleted file mode 100644 index f9cd09dd5793..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ColumnFamily.php +++ /dev/null @@ -1,93 +0,0 @@ -google.bigtable.admin.v2.ColumnFamily - */ -class ColumnFamily extends \Google\Protobuf\Internal\Message -{ - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - */ - protected $gc_rule = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule $gc_rule - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule|null - */ - public function getGcRule() - { - return $this->gc_rule; - } - - public function hasGcRule() - { - return isset($this->gc_rule); - } - - public function clearGcRule() - { - unset($this->gc_rule); - } - - /** - * Garbage collection rule specified as a protobuf. - * Must serialize to at most 500 bytes. - * NOTE: Garbage collection executes opportunistically in the background, and - * so it's possible for reads to return a cell even if it matches the active - * GC expression for its family. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule gc_rule = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule $var - * @return $this - */ - public function setGcRule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->gc_rule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php deleted file mode 100644 index 0efc355bd7d8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupMetadata.php +++ /dev/null @@ -1,172 +0,0 @@ -google.bigtable.admin.v2.CopyBackupMetadata - */ -class CopyBackupMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - */ - protected $source_backup_info = null; - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $source_backup_info - * Information about the source backup that is being copied from. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the backup being created through the copy operation. - * Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getSourceBackupInfo() - { - return $this->source_backup_info; - } - - public function hasSourceBackupInfo() - { - return isset($this->source_backup_info); - } - - public function clearSourceBackupInfo() - { - unset($this->source_backup_info); - } - - /** - * Information about the source backup that is being copied from. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo source_backup_info = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setSourceBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->source_backup_info = $var; - - return $this; - } - - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the - * [CopyBackup][google.bigtable.admin.v2.BigtableTableAdmin.CopyBackup] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php deleted file mode 100644 index 2212688f3c06..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CopyBackupRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.bigtable.admin.v2.CopyBackupRequest - */ -class CopyBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_backup = ''; - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $expire_time = null; - - /** - * @param string $parent Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $backupId Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param string $sourceBackup Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * @param \Google\Protobuf\Timestamp $expireTime Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CopyBackupRequest - * - * @experimental - */ - public static function build(string $parent, string $backupId, string $sourceBackup, \Google\Protobuf\Timestamp $expireTime): self - { - return (new self()) - ->setParent($parent) - ->setBackupId($backupId) - ->setSourceBackup($sourceBackup) - ->setExpireTime($expireTime); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $backup_id - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @type string $source_backup - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * @type \Google\Protobuf\Timestamp $expire_time - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceBackup() - { - return $this->source_backup; - } - - /** - * Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string source_backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceBackup($var) - { - GPBUtil::checkString($var, True); - $this->source_backup = $var; - - return $this; - } - - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php deleted file mode 100644 index 12b67e4093aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateAppProfileRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.bigtable.admin.v2.CreateAppProfileRequest - */ -class CreateAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile_id = ''; - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile = null; - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - */ - protected $ignore_warnings = false; - - /** - * @param string $parent Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * @param string $appProfileId Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateAppProfileRequest - * - * @experimental - */ - public static function build(string $parent, string $appProfileId, \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile): self - { - return (new self()) - ->setParent($parent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * @type string $app_profile_id - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * @type bool $ignore_warnings - * If true, ignore safety checks when creating the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * - * Generated from protobuf field string app_profile_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null - */ - public function getAppProfile() - { - return $this->app_profile; - } - - public function hasAppProfile() - { - return isset($this->app_profile); - } - - public function clearAppProfile() - { - unset($this->app_profile); - } - - /** - * Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var - * @return $this - */ - public function setAppProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profile = $var; - - return $this; - } - - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * If true, ignore safety checks when creating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 4; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php deleted file mode 100644 index 557de786e6de..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupMetadata.php +++ /dev/null @@ -1,190 +0,0 @@ -google.bigtable.admin.v2.CreateBackupMetadata - */ -class CreateBackupMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the backup being created. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - */ - protected $source_table = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the backup being created. - * @type string $source_table - * The name of the table the backup is created from. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the backup being created. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the backup being created. - * - * 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 name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - * @return string - */ - public function getSourceTable() - { - return $this->source_table; - } - - /** - * The name of the table the backup is created from. - * - * Generated from protobuf field string source_table = 2; - * @param string $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkString($var, True); - $this->source_table = $var; - - return $this; - } - - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @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 at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @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); - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php deleted file mode 100644 index 8022a0ae61ec..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateBackupRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.bigtable.admin.v2.CreateBackupRequest - */ -class CreateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_id = ''; - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - - /** - * @param string $parent Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $backupId Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to create. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateBackupRequest - * - * @experimental - */ - public static function build(string $parent, string $backupId, \Google\Cloud\Bigtable\Admin\V2\Backup $backup): self - { - return (new self()) - ->setParent($parent) - ->setBackupId($backupId) - ->setBackup($backup); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $backup_id - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup - * Required. The backup to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBackupId() - { - return $this->backup_id; - } - - /** - * Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * - * Generated from protobuf field string backup_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBackupId($var) - { - GPBUtil::checkString($var, True); - $this->backup_id = $var; - - return $this; - } - - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. The backup to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php deleted file mode 100644 index c752a40618c5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata.php +++ /dev/null @@ -1,223 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata - */ -class CreateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - */ - private $tables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $original_request - * The request that prompted the initiation of this CreateCluster operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * @type array|\Google\Protobuf\Internal\MapField $tables - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTables() - { - return $this->tables; - } - - /** - * Keys: the full `name` of each table that existed in the instance when - * CreateCluster was first called, i.e. - * `projects//instances//tables/
`. Any table added - * to the instance by a later API call will be created in the new cluster by - * that API call, not this one. - * Values: information on how much of a table's data has been copied to the - * newly-created cluster so far. - * - * Generated from protobuf field map tables = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress::class); - $this->tables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php deleted file mode 100644 index 6fbf11f7cc3b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress.php +++ /dev/null @@ -1,139 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata.TableProgress - */ -class TableProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - */ - protected $estimated_size_bytes = 0; - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - */ - protected $estimated_copied_bytes = 0; - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_size_bytes - * Estimate of the size of the table to be copied. - * @type int|string $estimated_copied_bytes - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * @type int $state - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - * @return int|string - */ - public function getEstimatedSizeBytes() - { - return $this->estimated_size_bytes; - } - - /** - * Estimate of the size of the table to be copied. - * - * Generated from protobuf field int64 estimated_size_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setEstimatedSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->estimated_size_bytes = $var; - - return $this; - } - - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - * @return int|string - */ - public function getEstimatedCopiedBytes() - { - return $this->estimated_copied_bytes; - } - - /** - * Estimate of the number of bytes copied so far for this table. - * This will eventually reach 'estimated_size_bytes' unless the table copy - * is CANCELLED. - * - * Generated from protobuf field int64 estimated_copied_bytes = 3; - * @param int|string $var - * @return $this - */ - public function setEstimatedCopiedBytes($var) - { - GPBUtil::checkInt64($var); - $this->estimated_copied_bytes = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata\TableProgress\State::class); - $this->state = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TableProgress::class, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php deleted file mode 100644 index f5fc34634589..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterMetadata/TableProgress/State.php +++ /dev/null @@ -1,76 +0,0 @@ -google.bigtable.admin.v2.CreateClusterMetadata.TableProgress.State - */ -class State -{ - /** - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The table has not yet begun copying to the new cluster. - * - * Generated from protobuf enum PENDING = 1; - */ - const PENDING = 1; - /** - * The table is actively being copied to the new cluster. - * - * Generated from protobuf enum COPYING = 2; - */ - const COPYING = 2; - /** - * The table has been fully copied to the new cluster. - * - * Generated from protobuf enum COMPLETED = 3; - */ - const COMPLETED = 3; - /** - * The table was deleted before it finished copying to the new cluster. - * Note that tables deleted after completion will stay marked as - * COMPLETED, not CANCELLED. - * - * Generated from protobuf enum CANCELLED = 4; - */ - const CANCELLED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PENDING => 'PENDING', - self::COPYING => 'COPYING', - self::COMPLETED => 'COMPLETED', - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata_TableProgress_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php deleted file mode 100644 index 8a849b579320..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateClusterRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.admin.v2.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - - /** - * @param string $parent Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * @param string $clusterId Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, string $clusterId, \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster): self - { - return (new self()) - ->setParent($parent) - ->setClusterId($clusterId) - ->setCluster($cluster); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * @type string $cluster_id - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php deleted file mode 100644 index dd7f505c0775..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.CreateInstanceMetadata - */ -class CreateInstanceMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $original_request - * The request that prompted the initiation of this CreateInstance operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateInstanceRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php deleted file mode 100644 index 7af92a99c778..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateInstanceRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.bigtable.admin.v2.CreateInstanceRequest - */ -class CreateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $clusters; - - /** - * @param string $parent Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. Please see - * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. - * @param string $instanceId Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * @param array $clusters Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateInstanceRequest - * - * @experimental - */ - public static function build(string $parent, string $instanceId, \Google\Cloud\Bigtable\Admin\V2\Instance $instance, array $clusters): self - { - return (new self()) - ->setParent($parent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * @type string $instance_id - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * @type array|\Google\Protobuf\Internal\MapField $clusters - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * 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 unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * - * 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 be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * - * Generated from protobuf field string instance_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * - * Generated from protobuf field map clusters = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->clusters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php deleted file mode 100644 index ad6178e78b9b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotMetadata.php +++ /dev/null @@ -1,173 +0,0 @@ -google.bigtable.admin.v2.CreateTableFromSnapshotMetadata - */ -class CreateTableFromSnapshotMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $original_request - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this CreateTableFromSnapshot - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.CreateTableFromSnapshotRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php deleted file mode 100644 index 2dfa7bc94901..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableFromSnapshotRequest.php +++ /dev/null @@ -1,184 +0,0 @@ -google.bigtable.admin.v2.CreateTableFromSnapshotRequest - */ -class CreateTableFromSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $source_snapshot = ''; - - /** - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * @param string $sourceSnapshot Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotRequest - * - * @experimental - */ - public static function build(string $parent, string $tableId, string $sourceSnapshot): self - { - return (new self()) - ->setParent($parent) - ->setTableId($tableId) - ->setSourceSnapshot($sourceSnapshot); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @type string $table_id - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * @type string $source_snapshot - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSourceSnapshot() - { - return $this->source_snapshot; - } - - /** - * Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string source_snapshot = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSourceSnapshot($var) - { - GPBUtil::checkString($var, True); - $this->source_snapshot = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php deleted file mode 100644 index 06608297cf48..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest.php +++ /dev/null @@ -1,265 +0,0 @@ -google.bigtable.admin.v2.CreateTableRequest - */ -class CreateTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = null; - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - */ - private $initial_splits; - - /** - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The Table to create. - * - * @return \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest - * - * @experimental - */ - public static function build(string $parent, string $tableId, \Google\Cloud\Bigtable\Admin\V2\Table $table): self - { - return (new self()) - ->setParent($parent) - ->setTableId($tableId) - ->setTable($table); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @type string $table_id - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * @type \Google\Cloud\Bigtable\Admin\V2\Table $table - * Required. The Table to create. - * @type array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $initial_splits - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getTable() - { - return $this->table; - } - - public function hasTable() - { - return isset($this->table); - } - - public function clearTable() - { - unset($this->table); - } - - /** - * Required. The Table to create. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->table = $var; - - return $this; - } - - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInitialSplits() - { - return $this->initial_splits; - } - - /** - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * Example: - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.CreateTableRequest.Split initial_splits = 4; - * @param array<\Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInitialSplits($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest\Split::class); - $this->initial_splits = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php deleted file mode 100644 index af1990b8531e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/CreateTableRequest/Split.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.CreateTableRequest.Split - */ -class Split extends \Google\Protobuf\Internal\Message -{ - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - */ - protected $key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Row key to use as an initial tablet boundary. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Row key to use as an initial tablet boundary. - * - * Generated from protobuf field bytes key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, False); - $this->key = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Split::class, \Google\Cloud\Bigtable\Admin\V2\CreateTableRequest_Split::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php deleted file mode 100644 index d5e04caa49fc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteAppProfileRequest.php +++ /dev/null @@ -1,125 +0,0 @@ -google.bigtable.admin.v2.DeleteAppProfileRequest - */ -class DeleteAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $ignore_warnings = false; - - /** - * @param string $name Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see - * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteAppProfileRequest - * - * @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 unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * @type bool $ignore_warnings - * Required. If true, ignore safety checks when deleting the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * 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 unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * Required. If true, ignore safety checks when deleting the app profile. - * - * Generated from protobuf field bool ignore_warnings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php deleted file mode 100644 index 6bd500313c94..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteBackupRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php deleted file mode 100644 index 690cdb21a15f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteClusterRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteClusterRequest - * - * @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 unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php deleted file mode 100644 index bcbc1c1a1e58..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.DeleteInstanceRequest - */ -class DeleteInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteInstanceRequest - * - * @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 unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php deleted file mode 100644 index b83ec8b2043b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteSnapshotRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.bigtable.admin.v2.DeleteSnapshotRequest - */ -class DeleteSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteSnapshotRequest - * - * @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 unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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 unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php deleted file mode 100644 index 3bd4eac51dc3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DeleteTableRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.DeleteTableRequest - */ -class DeleteTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\DeleteTableRequest - * - * @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 unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php deleted file mode 100644 index a005c44024c4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/DropRowRangeRequest.php +++ /dev/null @@ -1,154 +0,0 @@ -google.bigtable.admin.v2.DropRowRangeRequest - */ -class DropRowRangeRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - protected $target; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $row_key_prefix - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * @type bool $delete_all_data_from_table - * Delete all rows in the table. Setting this to false is a no-op. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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; - } - - /** - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * - * Generated from protobuf field bytes row_key_prefix = 2; - * @return string - */ - public function getRowKeyPrefix() - { - return $this->readOneof(2); - } - - public function hasRowKeyPrefix() - { - return $this->hasOneof(2); - } - - /** - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * - * Generated from protobuf field bytes row_key_prefix = 2; - * @param string $var - * @return $this - */ - public function setRowKeyPrefix($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Delete all rows in the table. Setting this to false is a no-op. - * - * Generated from protobuf field bool delete_all_data_from_table = 3; - * @return bool - */ - public function getDeleteAllDataFromTable() - { - return $this->readOneof(3); - } - - public function hasDeleteAllDataFromTable() - { - return $this->hasOneof(3); - } - - /** - * Delete all rows in the table. Setting this to false is a no-op. - * - * Generated from protobuf field bool delete_all_data_from_table = 3; - * @param bool $var - * @return $this - */ - public function setDeleteAllDataFromTable($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getTarget() - { - return $this->whichOneof("target"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php deleted file mode 100644 index d13861cd38e2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo.php +++ /dev/null @@ -1,160 +0,0 @@ -google.bigtable.admin.v2.EncryptionInfo - */ -class EncryptionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_type = 0; - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $encryption_status = null; - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $kms_key_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $encryption_type - * Output only. The type of encryption used to protect this resource. - * @type \Google\Rpc\Status $encryption_status - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * @type string $kms_key_version - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getEncryptionType() - { - return $this->encryption_type; - } - - /** - * Output only. The type of encryption used to protect this resource. - * - * Generated from protobuf field .google.bigtable.admin.v2.EncryptionInfo.EncryptionType encryption_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setEncryptionType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo\EncryptionType::class); - $this->encryption_type = $var; - - return $this; - } - - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Rpc\Status|null - */ - public function getEncryptionStatus() - { - return $this->encryption_status; - } - - public function hasEncryptionStatus() - { - return isset($this->encryption_status); - } - - public function clearEncryptionStatus() - { - unset($this->encryption_status); - } - - /** - * Output only. The status of encrypt/decrypt calls on underlying data for - * this resource. Regardless of status, the existing data is always encrypted - * at rest. - * - * Generated from protobuf field .google.rpc.Status encryption_status = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setEncryptionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->encryption_status = $var; - - return $this; - } - - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getKmsKeyVersion() - { - return $this->kms_key_version; - } - - /** - * Output only. The version of the Cloud KMS key specified in the parent - * cluster that is in use for the data underlying this table. - * - * Generated from protobuf field string kms_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setKmsKeyVersion($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php deleted file mode 100644 index 076657b976c4..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/EncryptionInfo/EncryptionType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.admin.v2.EncryptionInfo.EncryptionType - */ -class EncryptionType -{ - /** - * Encryption type was not specified, though data at rest remains encrypted. - * - * Generated from protobuf enum ENCRYPTION_TYPE_UNSPECIFIED = 0; - */ - const ENCRYPTION_TYPE_UNSPECIFIED = 0; - /** - * The data backing this resource is encrypted at rest with a key that is - * fully managed by Google. No key version or status will be populated. - * This is the default state. - * - * Generated from protobuf enum GOOGLE_DEFAULT_ENCRYPTION = 1; - */ - const GOOGLE_DEFAULT_ENCRYPTION = 1; - /** - * The data backing this resource is encrypted at rest with a key that is - * managed by the customer. - * The in-use version of the key and its status are populated for - * CMEK-protected tables. - * CMEK-protected backups are pinned to the key version that was in use at - * the time the backup was taken. This key version is populated but its - * status is not tracked and is reported as `UNKNOWN`. - * - * Generated from protobuf enum CUSTOMER_MANAGED_ENCRYPTION = 2; - */ - const CUSTOMER_MANAGED_ENCRYPTION = 2; - - private static $valueToName = [ - self::ENCRYPTION_TYPE_UNSPECIFIED => 'ENCRYPTION_TYPE_UNSPECIFIED', - self::GOOGLE_DEFAULT_ENCRYPTION => 'GOOGLE_DEFAULT_ENCRYPTION', - self::CUSTOMER_MANAGED_ENCRYPTION => 'CUSTOMER_MANAGED_ENCRYPTION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(EncryptionType::class, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo_EncryptionType::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php deleted file mode 100644 index 58f3cb15f627..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule.php +++ /dev/null @@ -1,180 +0,0 @@ -google.bigtable.admin.v2.GcRule - */ -class GcRule extends \Google\Protobuf\Internal\Message -{ - protected $rule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_num_versions - * Delete all cells in a column except the most recent N. - * @type \Google\Protobuf\Duration $max_age - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $intersection - * Delete cells that would be deleted by every nested rule. - * @type \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $union - * Delete cells that would be deleted by any nested rule. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Delete all cells in a column except the most recent N. - * - * Generated from protobuf field int32 max_num_versions = 1; - * @return int - */ - public function getMaxNumVersions() - { - return $this->readOneof(1); - } - - public function hasMaxNumVersions() - { - return $this->hasOneof(1); - } - - /** - * Delete all cells in a column except the most recent N. - * - * Generated from protobuf field int32 max_num_versions = 1; - * @param int $var - * @return $this - */ - public function setMaxNumVersions($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMaxAge() - { - return $this->readOneof(2); - } - - public function hasMaxAge() - { - return $this->hasOneof(2); - } - - /** - * Delete cells in a column older than the given age. - * Values must be at least one millisecond, and will be truncated to - * microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Duration max_age = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMaxAge($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Delete cells that would be deleted by every nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection|null - */ - public function getIntersection() - { - return $this->readOneof(3); - } - - public function hasIntersection() - { - return $this->hasOneof(3); - } - - /** - * Delete cells that would be deleted by every nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Intersection intersection = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection $var - * @return $this - */ - public function setIntersection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Intersection::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Delete cells that would be deleted by any nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; - * @return \Google\Cloud\Bigtable\Admin\V2\GcRule\Union|null - */ - public function getUnion() - { - return $this->readOneof(4); - } - - public function hasUnion() - { - return $this->hasOneof(4); - } - - /** - * Delete cells that would be deleted by any nested rule. - * - * Generated from protobuf field .google.bigtable.admin.v2.GcRule.Union union = 4; - * @param \Google\Cloud\Bigtable\Admin\V2\GcRule\Union $var - * @return $this - */ - public function setUnion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\GcRule\Union::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRule() - { - return $this->whichOneof("rule"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php deleted file mode 100644 index 3cdcac56ac62..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Intersection.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.GcRule.Intersection - */ -class Intersection extends \Google\Protobuf\Internal\Message -{ - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Only delete cells which would be deleted by every element of `rules`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Only delete cells which would be deleted by every element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->rules = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Intersection::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Intersection::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php deleted file mode 100644 index 0569197be3ac..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GcRule/Union.php +++ /dev/null @@ -1,70 +0,0 @@ -google.bigtable.admin.v2.GcRule.Union - */ -class Union extends \Google\Protobuf\Internal\Message -{ - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - */ - private $rules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Delete cells which would be deleted by any element of `rules`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Delete cells which would be deleted by any element of `rules`. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.GcRule rules = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\GcRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\GcRule::class); - $this->rules = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Union::class, \Google\Cloud\Bigtable\Admin\V2\GcRule_Union::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php deleted file mode 100644 index de27631825e5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.GenerateConsistencyTokenRequest - */ -class GenerateConsistencyTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenRequest - * - * @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 unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php deleted file mode 100644 index 6b02098b9ffc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GenerateConsistencyTokenResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.bigtable.admin.v2.GenerateConsistencyTokenResponse - */ -class GenerateConsistencyTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - */ - protected $consistency_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $consistency_token - * The generated consistency token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - * @return string - */ - public function getConsistencyToken() - { - return $this->consistency_token; - } - - /** - * The generated consistency token. - * - * Generated from protobuf field string consistency_token = 1; - * @param string $var - * @return $this - */ - public function setConsistencyToken($var) - { - GPBUtil::checkString($var, True); - $this->consistency_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php deleted file mode 100644 index 017793bbb5ff..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetAppProfileRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetAppProfileRequest - */ -class GetAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. Please see - * {@see BigtableInstanceAdminClient::appProfileName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetAppProfileRequest - * - * @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 unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * 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 unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php deleted file mode 100644 index 5f73e6f2900e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetBackupRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php deleted file mode 100644 index 037844cc19a3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetClusterRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetClusterRequest - * - * @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 unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php deleted file mode 100644 index 28ca52c590cd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetInstanceRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetInstanceRequest - * - * @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 unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * 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 unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php deleted file mode 100644 index 5b3547a68e7a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetSnapshotRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -google.bigtable.admin.v2.GetSnapshotRequest - */ -class GetSnapshotRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. Please see - * {@see BigtableTableAdminClient::snapshotName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetSnapshotRequest - * - * @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 unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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 unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php deleted file mode 100644 index 34142b7797a5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/GetTableRequest.php +++ /dev/null @@ -1,130 +0,0 @@ -google.bigtable.admin.v2.GetTableRequest - */ -class GetTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - */ - protected $view = 0; - - /** - * @param string $name Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\GetTableRequest - * - * @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 unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type int $view - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php deleted file mode 100644 index 4d75a90e66ee..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/HotTablet.php +++ /dev/null @@ -1,315 +0,0 @@ -google.bigtable.admin.v2.HotTablet - */ -class HotTablet extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * Output only. The start time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $start_time = null; - /** - * Output only. The end time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - */ - protected $start_key = ''; - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - */ - protected $end_key = ''; - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $node_cpu_usage_percent = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * @type string $table_name - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * @type \Google\Protobuf\Timestamp $start_time - * Output only. The start time of the hot tablet. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The end time of the hot tablet. - * @type string $start_key - * Tablet Start Key (inclusive). - * @type string $end_key - * Tablet End Key (inclusive). - * @type float $node_cpu_usage_percent - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the hot tablet. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/hotTablets/[a-zA-Z0-9_-]*`. - * - * 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; - } - - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Name of the table that contains the tablet. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * - * Generated from protobuf field string table_name = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * Output only. The start time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Output only. The start time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Output only. The end time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The end time of the hot tablet. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - * @return string - */ - public function getStartKey() - { - return $this->start_key; - } - - /** - * Tablet Start Key (inclusive). - * - * Generated from protobuf field string start_key = 5; - * @param string $var - * @return $this - */ - public function setStartKey($var) - { - GPBUtil::checkString($var, True); - $this->start_key = $var; - - return $this; - } - - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - * @return string - */ - public function getEndKey() - { - return $this->end_key; - } - - /** - * Tablet End Key (inclusive). - * - * Generated from protobuf field string end_key = 6; - * @param string $var - * @return $this - */ - public function setEndKey($var) - { - GPBUtil::checkString($var, True); - $this->end_key = $var; - - return $this; - } - - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return float - */ - public function getNodeCpuUsagePercent() - { - return $this->node_cpu_usage_percent; - } - - /** - * Output only. The average CPU usage spent by a node on this tablet over the - * start_time to end_time time range. The percentage is the amount of CPU used - * by the node to serve the tablet, from 0% (tablet was not interacted with) - * to 100% (the node spent all cycles serving the hot tablet). - * - * Generated from protobuf field float node_cpu_usage_percent = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param float $var - * @return $this - */ - public function setNodeCpuUsagePercent($var) - { - GPBUtil::checkFloat($var); - $this->node_cpu_usage_percent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php deleted file mode 100644 index 69fc8d87d690..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance.php +++ /dev/null @@ -1,354 +0,0 @@ -google.bigtable.admin.v2.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - */ - protected $state = 0; - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - */ - protected $type = 0; - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - /** - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * @type string $display_name - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * @type int $state - * (`OutputOnly`) - * The current state of the instance. - * @type int $type - * The type of the instance. Defaults to `PRODUCTION`. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * @type bool $satisfies_pzs - * Output only. Reserved for future use. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * - * 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; - } - - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * (`OutputOnly`) - * The current state of the instance. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.State state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\State::class); - $this->state = $var; - - return $this; - } - - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the instance. Defaults to `PRODUCTION`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance.Type type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Instance\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * - * 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; - } - - /** - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.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. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzs() - { - return isset($this->satisfies_pzs) ? $this->satisfies_pzs : false; - } - - public function hasSatisfiesPzs() - { - return isset($this->satisfies_pzs); - } - - public function clearSatisfiesPzs() - { - unset($this->satisfies_pzs); - } - - /** - * Output only. Reserved for future use. - * - * Generated from protobuf field optional bool satisfies_pzs = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php deleted file mode 100644 index 8442f3728c83..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.bigtable.admin.v2.Instance.State - */ -class State -{ - /** - * The state of the instance could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The instance has been successfully created and can serve requests - * to its tables. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The instance is currently being created, and may be destroyed - * if the creation process encounters an error. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Bigtable\Admin\V2\Instance_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php deleted file mode 100644 index 8e68c47b9d0f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Instance/Type.php +++ /dev/null @@ -1,68 +0,0 @@ -google.bigtable.admin.v2.Instance.Type - */ -class Type -{ - /** - * The type of the instance is unspecified. If set when creating an - * instance, a `PRODUCTION` instance will be created. If set when updating - * an instance, the type will be left unchanged. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * An instance meant for production use. `serve_nodes` must be set - * on the cluster. - * - * Generated from protobuf enum PRODUCTION = 1; - */ - const PRODUCTION = 1; - /** - * DEPRECATED: Prefer PRODUCTION for all use cases, as it no longer enforces - * a higher minimum node count than DEVELOPMENT. - * - * Generated from protobuf enum DEVELOPMENT = 2; - */ - const DEVELOPMENT = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::PRODUCTION => 'PRODUCTION', - self::DEVELOPMENT => 'DEVELOPMENT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Bigtable\Admin\V2\Instance_Type::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php deleted file mode 100644 index 42d6c478cd5c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.bigtable.admin.v2.ListAppProfilesRequest - */ -class ListAppProfilesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListAppProfilesRequest - * - * @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 unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * @type int $page_size - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * 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 unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * 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; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php deleted file mode 100644 index c49770b40a07..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListAppProfilesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.bigtable.admin.v2.ListAppProfilesResponse - */ -class ListAppProfilesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - */ - private $app_profiles; - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - */ - private $failed_locations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $app_profiles - * The list of requested app profiles. - * @type string $next_page_token - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAppProfiles() - { - return $this->app_profiles; - } - - /** - * The list of requested app profiles. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.AppProfile app_profiles = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\AppProfile>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAppProfiles($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profiles = $arr; - - return $this; - } - - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all app profiles could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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; - } - - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which AppProfile information could not be retrieved, - * due to an outage or some other transient condition. - * AppProfiles from these locations may be missing from `app_profiles`. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php deleted file mode 100644 index 6f5666e3bdbd..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsRequest.php +++ /dev/null @@ -1,429 +0,0 @@ -google.bigtable.admin.v2.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - */ - protected $order_by = ''; - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\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 cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @type string $filter - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * @type string $order_by - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * @type int $page_size - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * @type string $page_token - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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 cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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; - } - - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * The fields eligible for filtering are: - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * Some examples of using filters are: - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * - * 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; - } - - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * Fields supported are: - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * - * Generated from protobuf field string order_by = 3; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Number of backups to be returned in the response. If 0 or - * less, defaults to the server's maximum allowed page size. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * If non-empty, `page_token` should contain a - * [next_page_token][google.bigtable.admin.v2.ListBackupsResponse.next_page_token] - * from a previous - * [ListBackupsResponse][google.bigtable.admin.v2.ListBackupsResponse] to the - * same `parent` and with the same `filter`. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php deleted file mode 100644 index c9792bd915b6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListBackupsResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.bigtable.admin.v2.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - */ - private $backups; - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $backups - * The list of matching backups. - * @type string $next_page_token - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getBackups() - { - return $this->backups; - } - - /** - * The list of matching backups. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Backup backups = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Backup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * `next_page_token` can be sent in a subsequent - * [ListBackups][google.bigtable.admin.v2.BigtableTableAdmin.ListBackups] call - * to fetch more of the matching backups. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php deleted file mode 100644 index 00a12138e516..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.bigtable.admin.v2.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. Please see - * {@see BigtableInstanceAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListClustersRequest - * - * @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 unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * @type string $page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * 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 unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * - * 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; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php deleted file mode 100644 index 84ccf514aa70..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListClustersResponse.php +++ /dev/null @@ -1,151 +0,0 @@ -google.bigtable.admin.v2.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - */ - private $clusters; - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - */ - private $failed_locations; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $clusters - * The list of requested clusters. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * @type string $next_page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * The list of requested clusters. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Cluster clusters = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Cluster>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which Cluster information could not be retrieved, - * due to an outage or some other transient condition. - * Clusters from these locations may be missing from `clusters`, - * or may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php deleted file mode 100644 index 2fcefef12c29..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsRequest.php +++ /dev/null @@ -1,291 +0,0 @@ -google.bigtable.admin.v2.ListHotTabletsRequest - */ -class ListHotTabletsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * The end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableInstanceAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListHotTabletsRequest - * - * @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 cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type \Google\Protobuf\Timestamp $start_time - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * @type \Google\Protobuf\Timestamp $end_time - * The end time to list hot tablets. - * @type int $page_size - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * 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 start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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 end time to list hot tablets. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size that is empty or zero lets the server choose the number of - * items to return. A page_size which is strictly positive will return at most - * that many items. A negative page_size will cause an error. - * Following the first request, subsequent paginated calls do not need a - * page_size field. If a page_size is set in subsequent calls, it must match - * the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php deleted file mode 100644 index 39b6a733dade..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListHotTabletsResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -google.bigtable.admin.v2.ListHotTabletsResponse - */ -class ListHotTabletsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - */ - private $hot_tablets; - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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 array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $hot_tablets - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * @type string $next_page_token - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getHotTablets() - { - return $this->hot_tablets; - } - - /** - * List of hot tablets in the tables of the requested cluster that fall - * within the requested time range. Hot tablets are ordered by node cpu usage - * percent. If there are multiple hot tablets that correspond to the same - * tablet within a 15-minute interval, only the hot tablet with the highest - * node cpu usage will be included in the response. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.HotTablet hot_tablets = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\HotTablet>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setHotTablets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\HotTablet::class); - $this->hot_tablets = $arr; - - return $this; - } - - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all hot tablets could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php deleted file mode 100644 index e0d88b2803fa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.bigtable.admin.v2.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. Please see - * {@see BigtableInstanceAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListInstancesRequest - * - * @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 unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * @type string $page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * 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 unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * - * 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; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string page_token = 2; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php deleted file mode 100644 index 6e08425dbe3e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListInstancesResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.bigtable.admin.v2.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - */ - private $instances; - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - */ - private $failed_locations; - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $instances - * The list of requested instances. - * @type array|\Google\Protobuf\Internal\RepeatedField $failed_locations - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * @type string $next_page_token - * DEPRECATED: This field is unused and ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of requested instances. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Instance instances = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Instance>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFailedLocations() - { - return $this->failed_locations; - } - - /** - * Locations from which Instance information could not be retrieved, - * due to an outage or some other transient condition. - * Instances whose Clusters are all in one of the failed locations - * may be missing from `instances`, and Instances with at least one - * Cluster in a failed location may only have partial information returned. - * Values are of the form `projects//locations/` - * - * Generated from protobuf field repeated string failed_locations = 2; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFailedLocations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->failed_locations = $arr; - - return $this; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * DEPRECATED: This field is unused and ignored. - * - * Generated from protobuf field string next_page_token = 3; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php deleted file mode 100644 index 5ee84a207816..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.bigtable.admin.v2.ListSnapshotsRequest - */ -class ListSnapshotsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListSnapshotsRequest - * - * @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 unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @type int $page_size - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * 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 unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of snapshots to return per page. - * CURRENTLY UNIMPLEMENTED AND IGNORED. - * - * 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; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php deleted file mode 100644 index c3d9df13f7e0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListSnapshotsResponse.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.ListSnapshotsResponse - */ -class ListSnapshotsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - */ - private $snapshots; - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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 array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $snapshots - * The snapshots present in the requested cluster. - * @type string $next_page_token - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSnapshots() - { - return $this->snapshots; - } - - /** - * The snapshots present in the requested cluster. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Snapshot snapshots = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Snapshot>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSnapshots($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Snapshot::class); - $this->snapshots = $arr; - - return $this; - } - - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all snapshots could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php deleted file mode 100644 index d10580296a66..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesRequest.php +++ /dev/null @@ -1,217 +0,0 @@ -google.bigtable.admin.v2.ListTablesRequest - */ -class ListTablesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - */ - protected $view = 0; - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\ListTablesRequest - * - * @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 unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * @type int $view - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * @type int $page_size - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * @type string $page_token - * The value of `next_page_token` returned by a previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * - * 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 view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.View view = 2; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\View::class); - $this->view = $var; - - return $this; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Maximum number of results per page. - * A page_size of zero lets the server choose the number of items to return. - * A page_size which is strictly positive will return at most that many items. - * A negative page_size will cause an error. - * Following the first request, subsequent paginated calls are not required - * to pass a page_size. If a page_size is set in subsequent calls, it must - * match the page_size given in the first request. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The value of `next_page_token` returned by a previous call. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php deleted file mode 100644 index 1dac80ef82f5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ListTablesResponse.php +++ /dev/null @@ -1,110 +0,0 @@ -google.bigtable.admin.v2.ListTablesResponse - */ -class ListTablesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - */ - private $tables; - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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 array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $tables - * The tables present in the requested instance. - * @type string $next_page_token - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTables() - { - return $this->tables; - } - - /** - * The tables present in the requested instance. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.Table tables = 1; - * @param array<\Google\Cloud\Bigtable\Admin\V2\Table>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTables($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->tables = $arr; - - return $this; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Set if not all tables could be returned in a single response. - * Pass this value to `page_token` in another request to get the next - * page of 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php deleted file mode 100644 index 8960e4680f7d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest.php +++ /dev/null @@ -1,177 +0,0 @@ -google.bigtable.admin.v2.ModifyColumnFamiliesRequest - */ -class ModifyColumnFamiliesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $modifications; - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $ignore_warnings = false; - - /** - * @param string $name Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification[] $modifications Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * @return \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest - * - * @experimental - */ - public static function build(string $name, array $modifications): self - { - return (new self()) - ->setName($name) - ->setModifications($modifications); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $modifications - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * @type bool $ignore_warnings - * Optional. If true, ignore safety checks when modifying the column families. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getModifications() - { - return $this->modifications; - } - - /** - * Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification modifications = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setModifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest\Modification::class); - $this->modifications = $arr; - - return $this; - } - - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * Optional. If true, ignore safety checks when modifying the column families. - * - * Generated from protobuf field bool ignore_warnings = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php deleted file mode 100644 index 2e0a96ed1bba..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/ModifyColumnFamiliesRequest/Modification.php +++ /dev/null @@ -1,187 +0,0 @@ -google.bigtable.admin.v2.ModifyColumnFamiliesRequest.Modification - */ -class Modification extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - protected $mod; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The ID of the column family to be modified. - * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $create - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * @type \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $update - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * @type bool $drop - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The ID of the column family to be modified. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null - */ - public function getCreate() - { - return $this->readOneof(2); - } - - public function hasCreate() - { - return $this->hasOneof(2); - } - - /** - * Create a new column family with the specified schema, or fail if - * one already exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily create = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var - * @return $this - */ - public function setCreate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\ColumnFamily|null - */ - public function getUpdate() - { - return $this->readOneof(3); - } - - public function hasUpdate() - { - return $this->hasOneof(3); - } - - /** - * Update an existing column family to the specified schema, or fail - * if no column family exists with the given ID. - * - * Generated from protobuf field .google.bigtable.admin.v2.ColumnFamily update = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\ColumnFamily $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * - * Generated from protobuf field bool drop = 4; - * @return bool - */ - public function getDrop() - { - return $this->readOneof(4); - } - - public function hasDrop() - { - return $this->hasOneof(4); - } - - /** - * Drop (delete) the column family with the given ID, or fail if no such - * family exists. - * - * Generated from protobuf field bool drop = 4; - * @param bool $var - * @return $this - */ - public function setDrop($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getMod() - { - return $this->whichOneof("mod"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Modification::class, \Google\Cloud\Bigtable\Admin\V2\ModifyColumnFamiliesRequest_Modification::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php deleted file mode 100644 index 31e8504969ea..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OperationProgress.php +++ /dev/null @@ -1,164 +0,0 @@ -google.bigtable.admin.v2.OperationProgress - */ -class OperationProgress extends \Google\Protobuf\Internal\Message -{ - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - */ - protected $progress_percent = 0; - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $progress_percent - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * @type \Google\Protobuf\Timestamp $start_time - * Time the request was received. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation failed or was completed - * successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Common::initOnce(); - parent::__construct($data); - } - - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - * @return int - */ - public function getProgressPercent() - { - return $this->progress_percent; - } - - /** - * Percent completion of the operation. - * Values are between 0 and 100 inclusive. - * - * Generated from protobuf field int32 progress_percent = 1; - * @param int $var - * @return $this - */ - public function setProgressPercent($var) - { - GPBUtil::checkInt32($var); - $this->progress_percent = $var; - - return $this; - } - - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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); - } - - /** - * Time the request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation failed or was completed - * successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php deleted file mode 100644 index 6a51fb65bbe8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/OptimizeRestoredTableMetadata.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.admin.v2.OptimizeRestoredTableMetadata - */ -class OptimizeRestoredTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the restored table being optimized. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - */ - protected $progress = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the restored table being optimized. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the post-restore optimizations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the restored table being optimized. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the restored table being optimized. - * - * 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 progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the post-restore optimizations. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php deleted file mode 100644 index 60d2f7c47f64..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateClusterMetadata - */ -class PartialUpdateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - */ - protected $finish_time = null; - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - */ - protected $original_request = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $original_request - * The original request for PartialUpdateCluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The original request for PartialUpdateCluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateClusterRequest original_request = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest::class); - $this->original_request = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php deleted file mode 100644 index c5cb2b443eef..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateClusterRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateClusterRequest - */ -class PartialUpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Cluster fields which should be replaced. - * - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Cluster $cluster, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $cluster - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of Cluster fields which should be replaced. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster cluster = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The subset of Cluster fields which should be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php deleted file mode 100644 index 91e4ac7d79eb..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/PartialUpdateInstanceRequest.php +++ /dev/null @@ -1,141 +0,0 @@ -google.bigtable.admin.v2.PartialUpdateInstanceRequest - */ -class PartialUpdateInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $instance Required. The Instance which will (partially) replace the current value. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Instance $instance, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Instance $instance - * Required. The Instance which will (partially) replace the current value. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The Instance which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.Instance instance = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php deleted file mode 100644 index d470c27dc7b8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreInfo.php +++ /dev/null @@ -1,112 +0,0 @@ -google.bigtable.admin.v2.RestoreInfo - */ -class RestoreInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - */ - protected $source_type = 0; - protected $source_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $source_type - * The type of the restore source. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info - * Information about the backup used to restore the table. The backup - * may no longer exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 1; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Information about the backup used to restore the table. The backup - * may no longer exist. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getBackupInfo() - { - return $this->readOneof(2); - } - - public function hasBackupInfo() - { - return $this->hasOneof(2); - } - - /** - * Information about the backup used to restore the table. The backup - * may no longer exist. - * - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 2; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceInfo() - { - return $this->whichOneof("source_info"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php deleted file mode 100644 index f69bc82f8d8a..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreSourceType.php +++ /dev/null @@ -1,54 +0,0 @@ -google.bigtable.admin.v2.RestoreSourceType - */ -class RestoreSourceType -{ - /** - * No restore associated. - * - * Generated from protobuf enum RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; - */ - const RESTORE_SOURCE_TYPE_UNSPECIFIED = 0; - /** - * A backup was used as the source of the restore. - * - * Generated from protobuf enum BACKUP = 1; - */ - const BACKUP = 1; - - private static $valueToName = [ - self::RESTORE_SOURCE_TYPE_UNSPECIFIED => 'RESTORE_SOURCE_TYPE_UNSPECIFIED', - self::BACKUP => 'BACKUP', - ]; - - 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php deleted file mode 100644 index c487dd2c61b1..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableMetadata.php +++ /dev/null @@ -1,257 +0,0 @@ -google.bigtable.admin.v2.RestoreTableMetadata - */ -class RestoreTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the table being created and restored to. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - */ - protected $source_type = 0; - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - */ - protected $optimize_table_operation_name = ''; - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - */ - protected $progress = null; - protected $source_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the table being created and restored to. - * @type int $source_type - * The type of the restore source. - * @type \Google\Cloud\Bigtable\Admin\V2\BackupInfo $backup_info - * @type string $optimize_table_operation_name - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * @type \Google\Cloud\Bigtable\Admin\V2\OperationProgress $progress - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Name of the table being created and restored to. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the table being created and restored to. - * - * 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 type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * The type of the restore source. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreSourceType source_type = 2; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\RestoreSourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; - * @return \Google\Cloud\Bigtable\Admin\V2\BackupInfo|null - */ - public function getBackupInfo() - { - return $this->readOneof(3); - } - - public function hasBackupInfo() - { - return $this->hasOneof(3); - } - - /** - * Generated from protobuf field .google.bigtable.admin.v2.BackupInfo backup_info = 3; - * @param \Google\Cloud\Bigtable\Admin\V2\BackupInfo $var - * @return $this - */ - public function setBackupInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\BackupInfo::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - * @return string - */ - public function getOptimizeTableOperationName() - { - return $this->optimize_table_operation_name; - } - - /** - * If exists, the name of the long-running operation that will be used to - * track the post-restore optimization process to optimize the performance of - * the restored table. The metadata type of the long-running operation is - * [OptimizeRestoreTableMetadata][]. The response type is - * [Empty][google.protobuf.Empty]. This long-running operation may be - * automatically created by the system if applicable after the - * RestoreTable long-running operation completes successfully. This operation - * may not be created if the table is already optimized or the restore was - * not successful. - * - * Generated from protobuf field string optimize_table_operation_name = 4; - * @param string $var - * @return $this - */ - public function setOptimizeTableOperationName($var) - { - GPBUtil::checkString($var, True); - $this->optimize_table_operation_name = $var; - - return $this; - } - - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - * @return \Google\Cloud\Bigtable\Admin\V2\OperationProgress|null - */ - public function getProgress() - { - return $this->progress; - } - - public function hasProgress() - { - return isset($this->progress); - } - - public function clearProgress() - { - unset($this->progress); - } - - /** - * The progress of the - * [RestoreTable][google.bigtable.admin.v2.BigtableTableAdmin.RestoreTable] - * operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.OperationProgress progress = 5; - * @param \Google\Cloud\Bigtable\Admin\V2\OperationProgress $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\OperationProgress::class); - $this->progress = $var; - - return $this; - } - - /** - * @return string - */ - public function getSourceInfo() - { - return $this->whichOneof("source_info"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php deleted file mode 100644 index abdc023aa9c7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/RestoreTableRequest.php +++ /dev/null @@ -1,163 +0,0 @@ -google.bigtable.admin.v2.RestoreTableRequest - */ -class RestoreTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table_id = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * @type string $table_id - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * @type string $backup - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * 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 name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * - * 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 of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTableId() - { - return $this->table_id; - } - - /** - * Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * - * Generated from protobuf field string table_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTableId($var) - { - GPBUtil::checkString($var, True); - $this->table_id = $var; - - return $this; - } - - /** - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->readOneof(3); - } - - public function hasBackup() - { - return $this->hasOneof(3); - } - - /** - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * - * Generated from protobuf field string backup = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php deleted file mode 100644 index ed150a235f5b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot.php +++ /dev/null @@ -1,334 +0,0 @@ -google.bigtable.admin.v2.Snapshot - */ -class Snapshot extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_table = null; - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $data_size_bytes = 0; - /** - * Output only. The time when the snapshot is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - */ - protected $delete_time = null; - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * @type \Google\Cloud\Bigtable\Admin\V2\Table $source_table - * Output only. The source table at the time the snapshot was taken. - * @type int|string $data_size_bytes - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the snapshot is created. - * @type \Google\Protobuf\Timestamp $delete_time - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * @type int $state - * Output only. The current state of the snapshot. - * @type string $description - * Description of the snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * - * 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 source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getSourceTable() - { - return $this->source_table; - } - - public function hasSourceTable() - { - return isset($this->source_table); - } - - public function clearSourceTable() - { - unset($this->source_table); - } - - /** - * Output only. The source table at the time the snapshot was taken. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table source_table = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setSourceTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->source_table = $var; - - return $this; - } - - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDataSizeBytes() - { - return $this->data_size_bytes; - } - - /** - * Output only. The size of the data in the source table at the time the - * snapshot was taken. In some cases, this value may be computed - * asynchronously via a background process and a placeholder of 0 will be used - * in the meantime. - * - * Generated from protobuf field int64 data_size_bytes = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDataSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->data_size_bytes = $var; - - return $this; - } - - /** - * Output only. The time when the snapshot is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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 when the snapshot is created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.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; - } - - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @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); - } - - /** - * The time when the snapshot will be deleted. The maximum amount of time a - * snapshot can stay active is 365 days. If 'ttl' is not specified, - * the default maximum of 365 days will be used. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the snapshot. - * - * Generated from protobuf field .google.bigtable.admin.v2.Snapshot.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Snapshot\State::class); - $this->state = $var; - - return $this; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 7; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php deleted file mode 100644 index 07c31a2775e2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Snapshot/State.php +++ /dev/null @@ -1,66 +0,0 @@ -google.bigtable.admin.v2.Snapshot.State - */ -class State -{ - /** - * The state of the snapshot could not be determined. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The snapshot has been successfully created and can serve all requests. - * - * Generated from protobuf enum READY = 1; - */ - const READY = 1; - /** - * The snapshot is currently being created, and may be destroyed if the - * creation process encounters an error. A snapshot may not be restored to a - * table while it is being created. - * - * Generated from protobuf enum CREATING = 2; - */ - const CREATING = 2; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::READY => 'READY', - self::CREATING => 'CREATING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\Bigtable\Admin\V2\Snapshot_State::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php deleted file mode 100644 index 62d29e1d1bfa..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableMetadata.php +++ /dev/null @@ -1,169 +0,0 @@ -google.bigtable.admin.v2.SnapshotTableMetadata - */ -class SnapshotTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $original_request - * The request that prompted the initiation of this SnapshotTable operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this SnapshotTable operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.SnapshotTableRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php deleted file mode 100644 index 007e4b8c67ae..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/SnapshotTableRequest.php +++ /dev/null @@ -1,286 +0,0 @@ -google.bigtable.admin.v2.SnapshotTableRequest - */ -class SnapshotTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $cluster = ''; - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_id = ''; - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - */ - protected $ttl = null; - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - - /** - * @param string $name Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * @param string $cluster Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. Please see - * {@see BigtableTableAdminClient::clusterName()} for help formatting this field. - * @param string $snapshotId Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @param string $description Description of the snapshot. - * - * @return \Google\Cloud\Bigtable\Admin\V2\SnapshotTableRequest - * - * @experimental - */ - public static function build(string $name, string $cluster, string $snapshotId, string $description): self - { - return (new self()) - ->setName($name) - ->setCluster($cluster) - ->setSnapshotId($snapshotId) - ->setDescription($description); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @type string $cluster - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @type string $snapshot_id - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @type \Google\Protobuf\Duration $ttl - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * @type string $description - * Description of the snapshot. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * - * Generated from protobuf field string cluster = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSnapshotId() - { - return $this->snapshot_id; - } - - /** - * Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * - * Generated from protobuf field string snapshot_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSnapshotId($var) - { - GPBUtil::checkString($var, True); - $this->snapshot_id = $var; - - return $this; - } - - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getTtl() - { - return $this->ttl; - } - - public function hasTtl() - { - return isset($this->ttl); - } - - public function clearTtl() - { - unset($this->ttl); - } - - /** - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Description of the snapshot. - * - * Generated from protobuf field string description = 5; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php deleted file mode 100644 index 9bc95b2df390..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/StorageType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.bigtable.admin.v2.StorageType - */ -class StorageType -{ - /** - * The user did not specify a storage type. - * - * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; - */ - const STORAGE_TYPE_UNSPECIFIED = 0; - /** - * Flash (SSD) storage should be used. - * - * Generated from protobuf enum SSD = 1; - */ - const SSD = 1; - /** - * Magnetic drive (HDD) storage should be used. - * - * Generated from protobuf enum HDD = 2; - */ - const HDD = 2; - - private static $valueToName = [ - self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', - self::SSD => 'SSD', - self::HDD => 'HDD', - ]; - - 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php deleted file mode 100644 index a9950698cd27..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table.php +++ /dev/null @@ -1,364 +0,0 @@ -google.bigtable.admin.v2.Table - */ -class Table extends \Google\Protobuf\Internal\Message -{ - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cluster_states; - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - */ - private $column_families; - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $granularity = 0; - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $restore_info = null; - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - */ - protected $change_stream_config = null; - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - */ - protected $deletion_protection = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * @type array|\Google\Protobuf\Internal\MapField $cluster_states - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * @type array|\Google\Protobuf\Internal\MapField $column_families - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * @type int $granularity - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * @type \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $restore_info - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * @type \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $change_stream_config - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * @type bool $deletion_protection - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique name of the table. Values are of the form - * `projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`. - * Views: `NAME_ONLY`, `SCHEMA_VIEW`, `REPLICATION_VIEW`, `FULL` - * - * 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. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getClusterStates() - { - return $this->cluster_states; - } - - /** - * Output only. Map from cluster ID to per-cluster table state. - * If it could not be determined whether or not the table has data in a - * particular cluster (for example, if its zone is unavailable), then - * there will be an entry for the cluster with UNKNOWN `replication_status`. - * Views: `REPLICATION_VIEW`, `ENCRYPTION_VIEW`, `FULL` - * - * Generated from protobuf field map cluster_states = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setClusterStates($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState::class); - $this->cluster_states = $arr; - - return $this; - } - - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getColumnFamilies() - { - return $this->column_families; - } - - /** - * The column families configured for this table, mapped by column family ID. - * Views: `SCHEMA_VIEW`, `STATS_VIEW`, `FULL` - * - * Generated from protobuf field map column_families = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setColumnFamilies($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\ColumnFamily::class); - $this->column_families = $arr; - - return $this; - } - - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getGranularity() - { - return $this->granularity; - } - - /** - * Immutable. The granularity (i.e. `MILLIS`) at which timestamps are stored - * in this table. Timestamps not matching the granularity will be rejected. If - * unspecified at creation time, the value will be set to `MILLIS`. Views: - * `SCHEMA_VIEW`, `FULL`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.TimestampGranularity granularity = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\TimestampGranularity::class); - $this->granularity = $var; - - return $this; - } - - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Bigtable\Admin\V2\RestoreInfo|null - */ - public function getRestoreInfo() - { - return $this->restore_info; - } - - public function hasRestoreInfo() - { - return isset($this->restore_info); - } - - public function clearRestoreInfo() - { - unset($this->restore_info); - } - - /** - * Output only. If this table was restored from another data source (e.g. a - * backup), this field will be populated with information about the restore. - * - * Generated from protobuf field .google.bigtable.admin.v2.RestoreInfo restore_info = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Bigtable\Admin\V2\RestoreInfo $var - * @return $this - */ - public function setRestoreInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\RestoreInfo::class); - $this->restore_info = $var; - - return $this; - } - - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - * @return \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig|null - */ - public function getChangeStreamConfig() - { - return $this->change_stream_config; - } - - public function hasChangeStreamConfig() - { - return isset($this->change_stream_config); - } - - public function clearChangeStreamConfig() - { - unset($this->change_stream_config); - } - - /** - * If specified, enable the change stream on this table. - * Otherwise, the change stream is disabled and the change stream is not - * retained. - * - * Generated from protobuf field .google.bigtable.admin.v2.ChangeStreamConfig change_stream_config = 8; - * @param \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig $var - * @return $this - */ - public function setChangeStreamConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\ChangeStreamConfig::class); - $this->change_stream_config = $var; - - return $this; - } - - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - * @return bool - */ - public function getDeletionProtection() - { - return $this->deletion_protection; - } - - /** - * Set to true to make the table protected against data loss. i.e. deleting - * the following resources through Admin APIs are prohibited: - * * The table. - * * The column families in the table. - * * The instance containing the table. - * Note one can still delete the data stored in the table through Data APIs. - * - * Generated from protobuf field bool deletion_protection = 9; - * @param bool $var - * @return $this - */ - public function setDeletionProtection($var) - { - GPBUtil::checkBool($var); - $this->deletion_protection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php deleted file mode 100644 index 73802c4ea588..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState.php +++ /dev/null @@ -1,120 +0,0 @@ -google.bigtable.admin.v2.Table.ClusterState - */ -class ClusterState extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $replication_state = 0; - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $encryption_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $replication_state - * Output only. The state of replication for the table in this cluster. - * @type array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $encryption_info - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\Table::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getReplicationState() - { - return $this->replication_state; - } - - /** - * Output only. The state of replication for the table in this cluster. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table.ClusterState.ReplicationState replication_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setReplicationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\Admin\V2\Table\ClusterState\ReplicationState::class); - $this->replication_state = $var; - - return $this; - } - - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEncryptionInfo() - { - return $this->encryption_info; - } - - /** - * Output only. The encryption information for the table in this cluster. - * If the encryption key protecting this resource is customer managed, then - * its version can be rotated in Cloud Key Management Service (Cloud KMS). - * The primary version of the key and its status will be reflected here when - * changes propagate from Cloud KMS. - * - * Generated from protobuf field repeated .google.bigtable.admin.v2.EncryptionInfo encryption_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\Bigtable\Admin\V2\EncryptionInfo>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEncryptionInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\Admin\V2\EncryptionInfo::class); - $this->encryption_info = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClusterState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php deleted file mode 100644 index 483a7181036d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/ClusterState/ReplicationState.php +++ /dev/null @@ -1,93 +0,0 @@ -google.bigtable.admin.v2.Table.ClusterState.ReplicationState - */ -class ReplicationState -{ - /** - * The replication state of the table is unknown in this cluster. - * - * Generated from protobuf enum STATE_NOT_KNOWN = 0; - */ - const STATE_NOT_KNOWN = 0; - /** - * The cluster was recently created, and the table must finish copying - * over pre-existing data from other clusters before it can begin - * receiving live replication updates and serving Data API requests. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * The table is temporarily unable to serve Data API requests from this - * cluster due to planned internal maintenance. - * - * Generated from protobuf enum PLANNED_MAINTENANCE = 2; - */ - const PLANNED_MAINTENANCE = 2; - /** - * The table is temporarily unable to serve Data API requests from this - * cluster due to unplanned or emergency maintenance. - * - * Generated from protobuf enum UNPLANNED_MAINTENANCE = 3; - */ - const UNPLANNED_MAINTENANCE = 3; - /** - * The table can serve Data API requests from this cluster. Depending on - * replication delay, reads may not immediately reflect the state of the - * table in other clusters. - * - * Generated from protobuf enum READY = 4; - */ - const READY = 4; - /** - * The table is fully created and ready for use after a restore, and is - * being optimized for performance. When optimizations are complete, the - * table will transition to `READY` state. - * - * Generated from protobuf enum READY_OPTIMIZING = 5; - */ - const READY_OPTIMIZING = 5; - - private static $valueToName = [ - self::STATE_NOT_KNOWN => 'STATE_NOT_KNOWN', - self::INITIALIZING => 'INITIALIZING', - self::PLANNED_MAINTENANCE => 'PLANNED_MAINTENANCE', - self::UNPLANNED_MAINTENANCE => 'UNPLANNED_MAINTENANCE', - self::READY => 'READY', - self::READY_OPTIMIZING => 'READY_OPTIMIZING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ReplicationState::class, \Google\Cloud\Bigtable\Admin\V2\Table_ClusterState_ReplicationState::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php deleted file mode 100644 index 67b1b6d1f95f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/TimestampGranularity.php +++ /dev/null @@ -1,59 +0,0 @@ -google.bigtable.admin.v2.Table.TimestampGranularity - */ -class TimestampGranularity -{ - /** - * The user did not specify a granularity. Should not be returned. - * When specified during table creation, MILLIS will be used. - * - * Generated from protobuf enum TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; - */ - const TIMESTAMP_GRANULARITY_UNSPECIFIED = 0; - /** - * The table keeps data versioned at a granularity of 1ms. - * - * Generated from protobuf enum MILLIS = 1; - */ - const MILLIS = 1; - - private static $valueToName = [ - self::TIMESTAMP_GRANULARITY_UNSPECIFIED => 'TIMESTAMP_GRANULARITY_UNSPECIFIED', - self::MILLIS => 'MILLIS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TimestampGranularity::class, \Google\Cloud\Bigtable\Admin\V2\Table_TimestampGranularity::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php deleted file mode 100644 index f2355cc4aa83..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/Table/View.php +++ /dev/null @@ -1,86 +0,0 @@ -google.bigtable.admin.v2.Table.View - */ -class View -{ - /** - * Uses the default view for each method as documented in its request. - * - * Generated from protobuf enum VIEW_UNSPECIFIED = 0; - */ - const VIEW_UNSPECIFIED = 0; - /** - * Only populates `name`. - * - * Generated from protobuf enum NAME_ONLY = 1; - */ - const NAME_ONLY = 1; - /** - * Only populates `name` and fields related to the table's schema. - * - * Generated from protobuf enum SCHEMA_VIEW = 2; - */ - const SCHEMA_VIEW = 2; - /** - * Only populates `name` and fields related to the table's replication - * state. - * - * Generated from protobuf enum REPLICATION_VIEW = 3; - */ - const REPLICATION_VIEW = 3; - /** - * Only populates `name` and fields related to the table's encryption state. - * - * Generated from protobuf enum ENCRYPTION_VIEW = 5; - */ - const ENCRYPTION_VIEW = 5; - /** - * Populates all fields. - * - * Generated from protobuf enum FULL = 4; - */ - const FULL = 4; - - private static $valueToName = [ - self::VIEW_UNSPECIFIED => 'VIEW_UNSPECIFIED', - self::NAME_ONLY => 'NAME_ONLY', - self::SCHEMA_VIEW => 'SCHEMA_VIEW', - self::REPLICATION_VIEW => 'REPLICATION_VIEW', - self::ENCRYPTION_VIEW => 'ENCRYPTION_VIEW', - self::FULL => 'FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(View::class, \Google\Cloud\Bigtable\Admin\V2\Table_View::class); - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php deleted file mode 100644 index b847a234a946..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableMetadata.php +++ /dev/null @@ -1,156 +0,0 @@ -google.bigtable.admin.v2.UndeleteTableMetadata - */ -class UndeleteTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table being restored. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the table being restored. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table being restored. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the table being restored. - * - * 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 time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation finished or was cancelled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php deleted file mode 100644 index d3ead7ced6a2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UndeleteTableRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.bigtable.admin.v2.UndeleteTableRequest - */ -class UndeleteTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. Please see - * {@see BigtableTableAdminClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UndeleteTableRequest - * - * @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 unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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 unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * - * 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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php deleted file mode 100644 index aa4ccbf47fe0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.admin.v2.UpdateAppProfileMetadata - */ -class UpdateAppProfileMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php deleted file mode 100644 index 5933bed32b54..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateAppProfileRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.bigtable.admin.v2.UpdateAppProfileRequest - */ -class UpdateAppProfileRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $app_profile = null; - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - */ - protected $ignore_warnings = false; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile Required. The app profile which will (partially) replace the current value. - * @param \Google\Protobuf\FieldMask $updateMask Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\AppProfile $appProfile, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\AppProfile $app_profile - * Required. The app profile which will (partially) replace the current value. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * @type bool $ignore_warnings - * If true, ignore safety checks when updating the app profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\AppProfile|null - */ - public function getAppProfile() - { - return $this->app_profile; - } - - public function hasAppProfile() - { - return isset($this->app_profile); - } - - public function clearAppProfile() - { - unset($this->app_profile); - } - - /** - * Required. The app profile which will (partially) replace the current value. - * - * Generated from protobuf field .google.bigtable.admin.v2.AppProfile app_profile = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\AppProfile $var - * @return $this - */ - public function setAppProfile($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\AppProfile::class); - $this->app_profile = $var; - - return $this; - } - - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - * @return bool - */ - public function getIgnoreWarnings() - { - return $this->ignore_warnings; - } - - /** - * If true, ignore safety checks when updating the app profile. - * - * Generated from protobuf field bool ignore_warnings = 3; - * @param bool $var - * @return $this - */ - public function setIgnoreWarnings($var) - { - GPBUtil::checkBool($var); - $this->ignore_warnings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php deleted file mode 100644 index b450460b852b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateBackupRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.bigtable.admin.v2.UpdateBackupRequest - */ -class UpdateBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup = null; - /** - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $backup Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * - * * `backup.expire_time`. - * @param \Google\Protobuf\FieldMask $updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateBackupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Backup $backup, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Backup $backup - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Backup|null - */ - public function getBackup() - { - return $this->backup; - } - - public function hasBackup() - { - return isset($this->backup); - } - - public function clearBackup() - { - unset($this->backup); - } - - /** - * Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * * `backup.expire_time`. - * - * Generated from protobuf field .google.bigtable.admin.v2.Backup backup = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Backup $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Backup::class); - $this->backup = $var; - - return $this; - } - - /** - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php deleted file mode 100644 index 09fcde08400d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateClusterMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.UpdateClusterMetadata - */ -class UpdateClusterMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Cluster $original_request - * The request that prompted the initiation of this UpdateCluster operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\Cluster|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this UpdateCluster operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.Cluster original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\Cluster $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Cluster::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php deleted file mode 100644 index 5caa3d20f2a2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateInstanceMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.bigtable.admin.v2.UpdateInstanceMetadata - */ -class UpdateInstanceMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - */ - protected $original_request = null; - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - */ - protected $request_time = null; - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - */ - protected $finish_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $original_request - * The request that prompted the initiation of this UpdateInstance operation. - * @type \Google\Protobuf\Timestamp $request_time - * The time at which the original request was received. - * @type \Google\Protobuf\Timestamp $finish_time - * The time at which the operation failed or was completed successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableInstanceAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - * @return \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest|null - */ - public function getOriginalRequest() - { - return $this->original_request; - } - - public function hasOriginalRequest() - { - return isset($this->original_request); - } - - public function clearOriginalRequest() - { - unset($this->original_request); - } - - /** - * The request that prompted the initiation of this UpdateInstance operation. - * - * Generated from protobuf field .google.bigtable.admin.v2.PartialUpdateInstanceRequest original_request = 1; - * @param \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest $var - * @return $this - */ - public function setOriginalRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\PartialUpdateInstanceRequest::class); - $this->original_request = $var; - - return $this; - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getRequestTime() - { - return $this->request_time; - } - - public function hasRequestTime() - { - return isset($this->request_time); - } - - public function clearRequestTime() - { - unset($this->request_time); - } - - /** - * The time at which the original request was received. - * - * Generated from protobuf field .google.protobuf.Timestamp request_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setRequestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->request_time = $var; - - return $this; - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFinishTime() - { - return $this->finish_time; - } - - public function hasFinishTime() - { - return isset($this->finish_time); - } - - public function clearFinishTime() - { - unset($this->finish_time); - } - - /** - * The time at which the operation failed or was completed successfully. - * - * Generated from protobuf field .google.protobuf.Timestamp finish_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFinishTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->finish_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php deleted file mode 100644 index ab407c9bfd1b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableMetadata.php +++ /dev/null @@ -1,156 +0,0 @@ -google.bigtable.admin.v2.UpdateTableMetadata - */ -class UpdateTableMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the table being updated. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the table being updated. - * @type \Google\Protobuf\Timestamp $start_time - * The time at which this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * If set, the time at which this operation finished or was canceled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The name of the table being updated. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the table being updated. - * - * 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 time at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @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 at which this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @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); - } - - /** - * If set, the time at which this operation finished or was canceled. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php b/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php deleted file mode 100644 index 17d6cb5e06e6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/proto/src/Google/Cloud/Bigtable/Admin/V2/UpdateTableRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.bigtable.admin.v2.UpdateTableRequest - */ -class UpdateTableRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $table = null; - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Bigtable\Admin\V2\Table $table Required. The table to update. - * The table's `name` field is used to identify the table to update. - * @param \Google\Protobuf\FieldMask $updateMask Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * @return \Google\Cloud\Bigtable\Admin\V2\UpdateTableRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Bigtable\Admin\V2\Table $table, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setTable($table) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\Admin\V2\Table $table - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\Admin\V2\BigtableTableAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Bigtable\Admin\V2\Table|null - */ - public function getTable() - { - return $this->table; - } - - public function hasTable() - { - return isset($this->table); - } - - public function clearTable() - { - unset($this->table); - } - - /** - * Required. The table to update. - * The table's `name` field is used to identify the table to update. - * - * Generated from protobuf field .google.bigtable.admin.v2.Table table = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Bigtable\Admin\V2\Table $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\Admin\V2\Table::class); - $this->table = $var; - - return $this; - } - - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php deleted file mode 100644 index 72e388d9ba3e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_app_profile.php +++ /dev/null @@ -1,78 +0,0 @@ -createAppProfile( - $formattedParent, - $appProfileId, - $appProfile - ); - 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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = '[APP_PROFILE_ID]'; - - create_app_profile_sample($formattedParent, $appProfileId); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php deleted file mode 100644 index 9024a600b97d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_cluster.php +++ /dev/null @@ -1,92 +0,0 @@ -createCluster($formattedParent, $clusterId, $cluster); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = '[CLUSTER_ID]'; - - create_cluster_sample($formattedParent, $clusterId); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php deleted file mode 100644 index 99cb444eeade..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/create_instance.php +++ /dev/null @@ -1,106 +0,0 @@ -setDisplayName($instanceDisplayName); - $clusters = []; - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->createInstance( - $formattedParent, - $instanceId, - $instance, - $clusters - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); - $instanceId = '[INSTANCE_ID]'; - $instanceDisplayName = '[DISPLAY_NAME]'; - - create_instance_sample($formattedParent, $instanceId, $instanceDisplayName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_CreateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php deleted file mode 100644 index 166ce0f2df35..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_app_profile.php +++ /dev/null @@ -1,72 +0,0 @@ -deleteAppProfile($formattedName, $ignoreWarnings); - 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 = BigtableInstanceAdminClient::appProfileName( - '[PROJECT]', - '[INSTANCE]', - '[APP_PROFILE]' - ); - $ignoreWarnings = false; - - delete_app_profile_sample($formattedName, $ignoreWarnings); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php deleted file mode 100644 index 275de5558fbe..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_cluster.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteCluster($formattedName); - 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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - delete_cluster_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php deleted file mode 100644 index f997bcebb4af..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/delete_instance.php +++ /dev/null @@ -1,65 +0,0 @@ -deleteInstance($formattedName); - 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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - delete_instance_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_DeleteInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php deleted file mode 100644 index 7186a6d1b47b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_app_profile.php +++ /dev/null @@ -1,71 +0,0 @@ -getAppProfile($formattedName); - 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 = BigtableInstanceAdminClient::appProfileName( - '[PROJECT]', - '[INSTANCE]', - '[APP_PROFILE]' - ); - - get_app_profile_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php deleted file mode 100644 index 4f2f9e25fbf6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_cluster.php +++ /dev/null @@ -1,67 +0,0 @@ -getCluster($formattedName); - 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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - get_cluster_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php deleted file mode 100644 index 3d0efcb3fd7e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_iam_policy.php +++ /dev/null @@ -1,67 +0,0 @@ -getIamPolicy($resource); - 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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php deleted file mode 100644 index 5435adca70de..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/get_instance.php +++ /dev/null @@ -1,67 +0,0 @@ -getInstance($formattedName); - 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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - get_instance_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_GetInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php deleted file mode 100644 index e14f1fc353c8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_app_profiles.php +++ /dev/null @@ -1,75 +0,0 @@ -listAppProfiles($formattedParent); - - /** @var AppProfile $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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_app_profiles_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListAppProfiles_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php deleted file mode 100644 index f5443794344f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_clusters.php +++ /dev/null @@ -1,70 +0,0 @@ -listClusters($formattedParent); - 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 = BigtableInstanceAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_clusters_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListClusters_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php deleted file mode 100644 index 397d3c22ddf6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_hot_tablets.php +++ /dev/null @@ -1,74 +0,0 @@ -listHotTablets($formattedParent); - - /** @var HotTablet $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 = BigtableInstanceAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_hot_tablets_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListHotTablets_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php deleted file mode 100644 index b08beefd22b7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/list_instances.php +++ /dev/null @@ -1,67 +0,0 @@ -listInstances($formattedParent); - 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 = BigtableInstanceAdminClient::projectName('[PROJECT]'); - - list_instances_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_ListInstances_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php deleted file mode 100644 index 3f87a8505acf..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_cluster.php +++ /dev/null @@ -1,81 +0,0 @@ -partialUpdateCluster($cluster, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php deleted file mode 100644 index b2ad5d390127..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/partial_update_instance.php +++ /dev/null @@ -1,86 +0,0 @@ -setDisplayName($instanceDisplayName); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Instance $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 -{ - $instanceDisplayName = '[DISPLAY_NAME]'; - - partial_update_instance_sample($instanceDisplayName); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php deleted file mode 100644 index e5545113fa66..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/set_iam_policy.php +++ /dev/null @@ -1,70 +0,0 @@ -setIamPolicy($resource, $policy); - 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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php deleted file mode 100644 index 9e0c8b710750..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/test_iam_permissions.php +++ /dev/null @@ -1,74 +0,0 @@ -testIamPermissions($resource, $permissions); - 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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php deleted file mode 100644 index 936ebb85c34f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_app_profile.php +++ /dev/null @@ -1,70 +0,0 @@ -updateAppProfile($appProfile, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AppProfile $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 bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateAppProfile_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php deleted file mode 100644 index 664dc11bdf4f..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_cluster.php +++ /dev/null @@ -1,85 +0,0 @@ -updateCluster($name, $serveNodes); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Cluster $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 -{ - $name = '[NAME]'; - $serveNodes = 0; - - update_cluster_sample($name, $serveNodes); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php deleted file mode 100644 index 3d57318030e7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableInstanceAdminClient/update_instance.php +++ /dev/null @@ -1,78 +0,0 @@ -updateInstance($name, $displayName, $type, $labels); - 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]'; - $displayName = '[DISPLAY_NAME]'; - $type = Type::TYPE_UNSPECIFIED; - - update_instance_sample($name, $displayName, $type); -} -// [END bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateInstance_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php deleted file mode 100644 index 1e68d3db699d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/check_consistency.php +++ /dev/null @@ -1,72 +0,0 @@ -checkConsistency($formattedName, $consistencyToken); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = '[CONSISTENCY_TOKEN]'; - - check_consistency_sample($formattedName, $consistencyToken); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CheckConsistency_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php deleted file mode 100644 index aaf8a99e317c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/copy_backup.php +++ /dev/null @@ -1,114 +0,0 @@ -/instances//clusters//backups/`. Please see - * {@see BigtableTableAdminClient::backupName()} for help formatting this field. - */ -function copy_backup_sample( - string $formattedParent, - string $backupId, - string $formattedSourceBackup -): void { - // Create a client. - $bigtableTableAdminClient = new BigtableTableAdminClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $expireTime = new Timestamp(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->copyBackup( - $formattedParent, - $backupId, - $formattedSourceBackup, - $expireTime - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = '[BACKUP_ID]'; - $formattedSourceBackup = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - copy_backup_sample($formattedParent, $backupId, $formattedSourceBackup); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CopyBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php deleted file mode 100644 index 2a938db15718..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_backup.php +++ /dev/null @@ -1,108 +0,0 @@ -setSourceTable($backupSourceTable) - ->setExpireTime($backupExpireTime); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->createBackup($formattedParent, $backupId, $backup); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = '[BACKUP_ID]'; - $backupSourceTable = '[SOURCE_TABLE]'; - - create_backup_sample($formattedParent, $backupId, $backupSourceTable); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php deleted file mode 100644 index cdb878b0606d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table.php +++ /dev/null @@ -1,76 +0,0 @@ -createTable($formattedParent, $tableId, $table); - 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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - - create_table_sample($formattedParent, $tableId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php deleted file mode 100644 index 05fdde4bccbc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/create_table_from_snapshot.php +++ /dev/null @@ -1,107 +0,0 @@ -createTableFromSnapshot( - $formattedParent, - $tableId, - $formattedSourceSnapshot - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - $formattedSourceSnapshot = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - create_table_from_snapshot_sample($formattedParent, $tableId, $formattedSourceSnapshot); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_CreateTableFromSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php deleted file mode 100644 index a0d95b47bd9b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_backup.php +++ /dev/null @@ -1,71 +0,0 @@ -deleteBackup($formattedName); - 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 = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - delete_backup_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php deleted file mode 100644 index 8d4aafb2b0ba..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_snapshot.php +++ /dev/null @@ -1,77 +0,0 @@ -deleteSnapshot($formattedName); - 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 = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - delete_snapshot_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php deleted file mode 100644 index 9e05f2858df7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/delete_table.php +++ /dev/null @@ -1,66 +0,0 @@ -deleteTable($formattedName); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - delete_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php deleted file mode 100644 index ba70f318a61d..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/drop_row_range.php +++ /dev/null @@ -1,68 +0,0 @@ -dropRowRange($formattedName); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - drop_row_range_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_DropRowRange_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php deleted file mode 100644 index d3aaed0f6fa5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/generate_consistency_token.php +++ /dev/null @@ -1,71 +0,0 @@ -generateConsistencyToken($formattedName); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - generate_consistency_token_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GenerateConsistencyToken_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php deleted file mode 100644 index 7243d9eac939..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_backup.php +++ /dev/null @@ -1,73 +0,0 @@ -getBackup($formattedName); - 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 = BigtableTableAdminClient::backupName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[BACKUP]' - ); - - get_backup_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php deleted file mode 100644 index cfa1e0a685f2..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_iam_policy.php +++ /dev/null @@ -1,68 +0,0 @@ -getIamPolicy($resource); - 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 -{ - $resource = '[RESOURCE]'; - - get_iam_policy_sample($resource); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php deleted file mode 100644 index bc344a2d5a20..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_snapshot.php +++ /dev/null @@ -1,79 +0,0 @@ -getSnapshot($formattedName); - 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 = BigtableTableAdminClient::snapshotName( - '[PROJECT]', - '[INSTANCE]', - '[CLUSTER]', - '[SNAPSHOT]' - ); - - get_snapshot_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetSnapshot_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php deleted file mode 100644 index 1a44e64280a8..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/get_table.php +++ /dev/null @@ -1,68 +0,0 @@ -getTable($formattedName); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - get_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_GetTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php deleted file mode 100644 index d755f6b898b5..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_backups.php +++ /dev/null @@ -1,75 +0,0 @@ -listBackups($formattedParent); - - /** @var Backup $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_backups_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php deleted file mode 100644 index 605c63e65c65..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_snapshots.php +++ /dev/null @@ -1,81 +0,0 @@ -listSnapshots($formattedParent); - - /** @var Snapshot $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 = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - - list_snapshots_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListSnapshots_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php deleted file mode 100644 index 80a8b4e6b8fc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/list_tables.php +++ /dev/null @@ -1,72 +0,0 @@ -listTables($formattedParent); - - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - - list_tables_sample($formattedParent); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ListTables_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php deleted file mode 100644 index 2b2f52b470e0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/modify_column_families.php +++ /dev/null @@ -1,75 +0,0 @@ -modifyColumnFamilies($formattedName, $modifications); - 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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - modify_column_families_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_ModifyColumnFamilies_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php deleted file mode 100644 index bccfcbb0c429..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/restore_table.php +++ /dev/null @@ -1,90 +0,0 @@ -/instances/`. Please see - * {@see BigtableTableAdminClient::instanceName()} for help formatting this field. - * @param string $tableId The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - */ -function restore_table_sample(string $formattedParent, string $tableId): void -{ - // Create a client. - $bigtableTableAdminClient = new BigtableTableAdminClient(); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $bigtableTableAdminClient->restoreTable($formattedParent, $tableId); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 = BigtableTableAdminClient::instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = '[TABLE_ID]'; - - restore_table_sample($formattedParent, $tableId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_RestoreTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php deleted file mode 100644 index 4215d3305613..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/set_iam_policy.php +++ /dev/null @@ -1,70 +0,0 @@ -setIamPolicy($resource, $policy); - 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 -{ - $resource = '[RESOURCE]'; - - set_iam_policy_sample($resource); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_SetIamPolicy_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php deleted file mode 100644 index 3d99d3f70061..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/snapshot_table.php +++ /dev/null @@ -1,104 +0,0 @@ -snapshotTable( - $formattedName, - $formattedCluster, - $snapshotId - ); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Snapshot $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = BigtableTableAdminClient::clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = '[SNAPSHOT_ID]'; - - snapshot_table_sample($formattedName, $formattedCluster, $snapshotId); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_SnapshotTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php deleted file mode 100644 index 2013ea09119b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/test_iam_permissions.php +++ /dev/null @@ -1,75 +0,0 @@ -testIamPermissions($resource, $permissions); - 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 -{ - $resource = '[RESOURCE]'; - $permissionsElement = '[PERMISSIONS]'; - - test_iam_permissions_sample($resource, $permissionsElement); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_TestIamPermissions_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php deleted file mode 100644 index c25f5fbf4df3..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/undelete_table.php +++ /dev/null @@ -1,80 +0,0 @@ -undeleteTable($formattedName); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 = BigtableTableAdminClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - undelete_table_sample($formattedName); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_UndeleteTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php deleted file mode 100644 index dc212dd4b543..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_backup.php +++ /dev/null @@ -1,76 +0,0 @@ -setSourceTable($backupSourceTable) - ->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $bigtableTableAdminClient->updateBackup($backup, $updateMask); - 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 -{ - $backupSourceTable = '[SOURCE_TABLE]'; - - update_backup_sample($backupSourceTable); -} -// [END bigtableadmin_v2_generated_BigtableTableAdmin_UpdateBackup_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php b/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php deleted file mode 100644 index 40ca34ccf444..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/samples/V2/BigtableTableAdminClient/update_table.php +++ /dev/null @@ -1,70 +0,0 @@ -updateTable($table, $updateMask); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Table $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 bigtableadmin_v2_generated_BigtableTableAdmin_UpdateTable_sync] diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/BigtableInstanceAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/BigtableInstanceAdminClient.php deleted file mode 100644 index 80ee5b7005d6..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/BigtableInstanceAdminClient.php +++ /dev/null @@ -1,34 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_instance_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_instance_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a app_profile - * resource. - * - * @param string $project - * @param string $instance - * @param string $appProfile - * - * @return string The formatted app_profile resource. - */ - public static function appProfileName(string $project, string $instance, string $appProfile): string - { - return self::getPathTemplate('appProfile')->render([ - 'project' => $project, - 'instance' => $instance, - 'app_profile' => $appProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $instance, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * 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 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, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - appProfile: projects/{project}/instances/{instance}/appProfiles/{app_profile} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - instance: projects/{project}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtableadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates an app profile within an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::createAppProfileAsync()} - * . - * - * @param CreateAppProfileRequest $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 AppProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAppProfile(CreateAppProfileRequest $request, array $callOptions = []): AppProfile - { - return $this->startApiCall('CreateAppProfile', $request, $callOptions)->wait(); - } - - /** - * Creates a cluster within an instance. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * The async variant is {@see BigtableInstanceAdminClient::createClusterAsync()} . - * - * @param CreateClusterRequest $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 createCluster(CreateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCluster', $request, $callOptions)->wait(); - } - - /** - * Create an instance within a project. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * The async variant is {@see BigtableInstanceAdminClient::createInstanceAsync()} . - * - * @param CreateInstanceRequest $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 createInstance(CreateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateInstance', $request, $callOptions)->wait(); - } - - /** - * Deletes an app profile from an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteAppProfileAsync()} - * . - * - * @param DeleteAppProfileRequest $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 deleteAppProfile(DeleteAppProfileRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAppProfile', $request, $callOptions)->wait(); - } - - /** - * Deletes a cluster from an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteClusterAsync()} . - * - * @param DeleteClusterRequest $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 deleteCluster(DeleteClusterRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Delete an instance from a project. - * - * The async variant is {@see BigtableInstanceAdminClient::deleteInstanceAsync()} . - * - * @param DeleteInstanceRequest $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 deleteInstance(DeleteInstanceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteInstance', $request, $callOptions)->wait(); - } - - /** - * Gets information about an app profile. - * - * The async variant is {@see BigtableInstanceAdminClient::getAppProfileAsync()} . - * - * @param GetAppProfileRequest $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 AppProfile - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAppProfile(GetAppProfileRequest $request, array $callOptions = []): AppProfile - { - return $this->startApiCall('GetAppProfile', $request, $callOptions)->wait(); - } - - /** - * Gets information about a cluster. - * - * The async variant is {@see BigtableInstanceAdminClient::getClusterAsync()} . - * - * @param GetClusterRequest $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 Cluster - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCluster(GetClusterRequest $request, array $callOptions = []): Cluster - { - return $this->startApiCall('GetCluster', $request, $callOptions)->wait(); - } - - /** - * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - * - * The async variant is {@see BigtableInstanceAdminClient::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets information about an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::getInstanceAsync()} . - * - * @param GetInstanceRequest $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 Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function getInstance(GetInstanceRequest $request, array $callOptions = []): Instance - { - return $this->startApiCall('GetInstance', $request, $callOptions)->wait(); - } - - /** - * Lists information about app profiles in an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::listAppProfilesAsync()} - * . - * - * @param ListAppProfilesRequest $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 listAppProfiles(ListAppProfilesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAppProfiles', $request, $callOptions); - } - - /** - * Lists information about clusters in an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::listClustersAsync()} . - * - * @param ListClustersRequest $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 ListClustersResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): ListClustersResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions)->wait(); - } - - /** - * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - * - * The async variant is {@see BigtableInstanceAdminClient::listHotTabletsAsync()} . - * - * @param ListHotTabletsRequest $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 listHotTablets(ListHotTabletsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListHotTablets', $request, $callOptions); - } - - /** - * Lists information about instances in a project. - * - * The async variant is {@see BigtableInstanceAdminClient::listInstancesAsync()} . - * - * @param ListInstancesRequest $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 ListInstancesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): ListInstancesResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions)->wait(); - } - - /** - * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - * - * The async variant is - * {@see BigtableInstanceAdminClient::partialUpdateClusterAsync()} . - * - * @param PartialUpdateClusterRequest $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 partialUpdateCluster(PartialUpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PartialUpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - * - * The async variant is - * {@see BigtableInstanceAdminClient::partialUpdateInstanceAsync()} . - * - * @param PartialUpdateInstanceRequest $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 partialUpdateInstance(PartialUpdateInstanceRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('PartialUpdateInstance', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on an instance resource. Replaces any - * existing policy. - * - * The async variant is {@see BigtableInstanceAdminClient::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that the caller has on the specified instance resource. - * - * The async variant is - * {@see BigtableInstanceAdminClient::testIamPermissionsAsync()} . - * - * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Updates an app profile within an instance. - * - * The async variant is {@see BigtableInstanceAdminClient::updateAppProfileAsync()} - * . - * - * @param UpdateAppProfileRequest $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 updateAppProfile(UpdateAppProfileRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAppProfile', $request, $callOptions)->wait(); - } - - /** - * Updates a cluster within an instance. - * - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - * - * The async variant is {@see BigtableInstanceAdminClient::updateClusterAsync()} . - * - * @param Cluster $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 updateCluster(Cluster $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Updates an instance within a project. This method updates only the display - * name and type for an Instance. To update other Instance properties, such as - * labels, use PartialUpdateInstance. - * - * The async variant is {@see BigtableInstanceAdminClient::updateInstanceAsync()} . - * - * @param Instance $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 Instance - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateInstance(Instance $request, array $callOptions = []): Instance - { - return $this->startApiCall('UpdateInstance', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php deleted file mode 100644 index d98cfe11065c..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Client/BigtableTableAdminClient.php +++ /dev/null @@ -1,1078 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_table_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_table_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 = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $instance, string $cluster, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $instance, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName(string $project, string $location, string $keyRing, string $cryptoKey, string $cryptoKeyVersion): string - { - return self::getPathTemplate('cryptoKeyVersion')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snapshot - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $snapshot - * - * @return string The formatted snapshot resource. - */ - public static function snapshotName(string $project, string $instance, string $cluster, string $snapshot): string - { - return self::getPathTemplate('snapshot')->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'snapshot' => $snapshot, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $instance, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * 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}/instances/{instance}/clusters/{cluster}/backups/{backup} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - instance: projects/{project}/instances/{instance} - * - snapshot: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtableadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Checks replication consistency based on a consistency token, that is, if - * replication has caught up based on the conditions specified in the token - * and the check request. - * - * The async variant is {@see BigtableTableAdminClient::checkConsistencyAsync()} . - * - * @param CheckConsistencyRequest $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 CheckConsistencyResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkConsistency(CheckConsistencyRequest $request, array $callOptions = []): CheckConsistencyResponse - { - return $this->startApiCall('CheckConsistency', $request, $callOptions)->wait(); - } - - /** - * Copy a Cloud Bigtable backup to a new backup in the destination cluster - * located in the destination instance and project. - * - * The async variant is {@see BigtableTableAdminClient::copyBackupAsync()} . - * - * @param CopyBackupRequest $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 copyBackup(CopyBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CopyBackup', $request, $callOptions)->wait(); - } - - /** - * Starts creating a new Cloud Bigtable Backup. The returned backup - * [long-running operation][google.longrunning.Operation] can be used to - * track creation of the backup. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The - * [response][google.longrunning.Operation.response] field type is - * [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the - * returned operation will stop the creation and delete the backup. - * - * The async variant is {@see BigtableTableAdminClient::createBackupAsync()} . - * - * @param CreateBackupRequest $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 createBackup(CreateBackupRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBackup', $request, $callOptions)->wait(); - } - - /** - * Creates a new table in the specified instance. - * The table can be created with a full set of initial column families, - * specified in the request. - * - * The async variant is {@see BigtableTableAdminClient::createTableAsync()} . - * - * @param CreateTableRequest $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 Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function createTable(CreateTableRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('CreateTable', $request, $callOptions)->wait(); - } - - /** - * Creates a new table from the specified snapshot. The target table must - * not exist. The snapshot and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is - * {@see BigtableTableAdminClient::createTableFromSnapshotAsync()} . - * - * @param CreateTableFromSnapshotRequest $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 createTableFromSnapshot(CreateTableFromSnapshotRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateTableFromSnapshot', $request, $callOptions)->wait(); - } - - /** - * Deletes a pending or completed Cloud Bigtable backup. - * - * The async variant is {@see BigtableTableAdminClient::deleteBackupAsync()} . - * - * @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(); - } - - /** - * Permanently deletes the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::deleteSnapshotAsync()} . - * - * @param DeleteSnapshotRequest $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 deleteSnapshot(DeleteSnapshotRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSnapshot', $request, $callOptions)->wait(); - } - - /** - * Permanently deletes a specified table and all of its data. - * - * The async variant is {@see BigtableTableAdminClient::deleteTableAsync()} . - * - * @param DeleteTableRequest $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 deleteTable(DeleteTableRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteTable', $request, $callOptions)->wait(); - } - - /** - * Permanently drop/delete a row range from a specified table. The request can - * specify whether to delete all rows in a table, or only those that match a - * particular prefix. - * - * The async variant is {@see BigtableTableAdminClient::dropRowRangeAsync()} . - * - * @param DropRowRangeRequest $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 dropRowRange(DropRowRangeRequest $request, array $callOptions = []): void - { - $this->startApiCall('DropRowRange', $request, $callOptions)->wait(); - } - - /** - * Generates a consistency token for a Table, which can be used in - * CheckConsistency to check whether mutations to the table that finished - * before this call started have been replicated. The tokens will be available - * for 90 days. - * - * The async variant is - * {@see BigtableTableAdminClient::generateConsistencyTokenAsync()} . - * - * @param GenerateConsistencyTokenRequest $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 GenerateConsistencyTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateConsistencyToken(GenerateConsistencyTokenRequest $request, array $callOptions = []): GenerateConsistencyTokenResponse - { - return $this->startApiCall('GenerateConsistencyToken', $request, $callOptions)->wait(); - } - - /** - * Gets metadata on a pending or completed Cloud Bigtable Backup. - * - * The async variant is {@see BigtableTableAdminClient::getBackupAsync()} . - * - * @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 the access control policy for a Table or Backup resource. - * Returns an empty policy if the resource exists but does not have a policy - * set. - * - * The async variant is {@see BigtableTableAdminClient::getIamPolicyAsync()} . - * - * @param GetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIamPolicy(GetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('GetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Gets metadata information about the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::getSnapshotAsync()} . - * - * @param GetSnapshotRequest $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 Snapshot - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSnapshot(GetSnapshotRequest $request, array $callOptions = []): Snapshot - { - return $this->startApiCall('GetSnapshot', $request, $callOptions)->wait(); - } - - /** - * Gets metadata information about the specified table. - * - * The async variant is {@see BigtableTableAdminClient::getTableAsync()} . - * - * @param GetTableRequest $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 Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTable(GetTableRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('GetTable', $request, $callOptions)->wait(); - } - - /** - * Lists Cloud Bigtable backups. Returns both completed and pending - * backups. - * - * The async variant is {@see BigtableTableAdminClient::listBackupsAsync()} . - * - * @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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions); - } - - /** - * Lists all snapshots associated with the specified cluster. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::listSnapshotsAsync()} . - * - * @param ListSnapshotsRequest $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 listSnapshots(ListSnapshotsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSnapshots', $request, $callOptions); - } - - /** - * Lists all tables served from a specified instance. - * - * The async variant is {@see BigtableTableAdminClient::listTablesAsync()} . - * - * @param ListTablesRequest $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 listTables(ListTablesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTables', $request, $callOptions); - } - - /** - * Performs a series of column family modifications on the specified table. - * Either all or none of the modifications will occur before this method - * returns, but data requests received prior to that point may see a table - * where only some modifications have taken effect. - * - * The async variant is - * {@see BigtableTableAdminClient::modifyColumnFamiliesAsync()} . - * - * @param ModifyColumnFamiliesRequest $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 Table - * - * @throws ApiException Thrown if the API call fails. - */ - public function modifyColumnFamilies(ModifyColumnFamiliesRequest $request, array $callOptions = []): Table - { - return $this->startApiCall('ModifyColumnFamilies', $request, $callOptions)->wait(); - } - - /** - * Create a new table by restoring from a completed backup. The - * returned table [long-running operation][google.longrunning.Operation] can - * be used to track the progress of the operation, and to cancel it. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The - * [response][google.longrunning.Operation.response] type is - * [Table][google.bigtable.admin.v2.Table], if successful. - * - * The async variant is {@see BigtableTableAdminClient::restoreTableAsync()} . - * - * @param RestoreTableRequest $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 restoreTable(RestoreTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreTable', $request, $callOptions)->wait(); - } - - /** - * Sets the access control policy on a Table or Backup resource. - * Replaces any existing policy. - * - * The async variant is {@see BigtableTableAdminClient::setIamPolicyAsync()} . - * - * @param SetIamPolicyRequest $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 Policy - * - * @throws ApiException Thrown if the API call fails. - */ - public function setIamPolicy(SetIamPolicyRequest $request, array $callOptions = []): Policy - { - return $this->startApiCall('SetIamPolicy', $request, $callOptions)->wait(); - } - - /** - * Creates a new snapshot in the specified cluster from the specified - * source table. The cluster and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * The async variant is {@see BigtableTableAdminClient::snapshotTableAsync()} . - * - * @param SnapshotTableRequest $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 snapshotTable(SnapshotTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('SnapshotTable', $request, $callOptions)->wait(); - } - - /** - * Returns permissions that the caller has on the specified Table or Backup - * resource. - * - * The async variant is {@see BigtableTableAdminClient::testIamPermissionsAsync()} - * . - * - * @param TestIamPermissionsRequest $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 TestIamPermissionsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function testIamPermissions(TestIamPermissionsRequest $request, array $callOptions = []): TestIamPermissionsResponse - { - return $this->startApiCall('TestIamPermissions', $request, $callOptions)->wait(); - } - - /** - * Restores a specified table which was accidentally deleted. - * - * The async variant is {@see BigtableTableAdminClient::undeleteTableAsync()} . - * - * @param UndeleteTableRequest $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 undeleteTable(UndeleteTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeleteTable', $request, $callOptions)->wait(); - } - - /** - * Updates a pending or completed Cloud Bigtable Backup. - * - * The async variant is {@see BigtableTableAdminClient::updateBackupAsync()} . - * - * @param UpdateBackupRequest $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 updateBackup(UpdateBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('UpdateBackup', $request, $callOptions)->wait(); - } - - /** - * Updates a specified table. - * - * The async variant is {@see BigtableTableAdminClient::updateTableAsync()} . - * - * @param UpdateTableRequest $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 updateTable(UpdateTableRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateTable', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableInstanceAdminGapicClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableInstanceAdminGapicClient.php deleted file mode 100644 index eb7f9b665e55..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableInstanceAdminGapicClient.php +++ /dev/null @@ -1,1763 +0,0 @@ -instanceName('[PROJECT]', '[INSTANCE]'); - * $appProfileId = 'app_profile_id'; - * $appProfile = new AppProfile(); - * $response = $bigtableInstanceAdminClient->createAppProfile($formattedParent, $appProfileId, $appProfile); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Bigtable\Admin\V2\Client\BigtableInstanceAdminClient} to use the - * new surface. - */ -class BigtableInstanceAdminGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableInstanceAdmin'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.cluster', - 'https://www.googleapis.com/auth/bigtable.admin.instance', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.cluster', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private static $appProfileNameTemplate; - - private static $clusterNameTemplate; - - private static $cryptoKeyNameTemplate; - - private static $instanceNameTemplate; - - private static $locationNameTemplate; - - private static $projectNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_instance_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_instance_admin_rest_client_config.php', - ], - ], - ]; - } - - private static function getAppProfileNameTemplate() - { - if (self::$appProfileNameTemplate == null) { - self::$appProfileNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/appProfiles/{app_profile}'); - } - - return self::$appProfileNameTemplate; - } - - private static function getClusterNameTemplate() - { - if (self::$clusterNameTemplate == null) { - self::$clusterNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/clusters/{cluster}'); - } - - return self::$clusterNameTemplate; - } - - private static function getCryptoKeyNameTemplate() - { - if (self::$cryptoKeyNameTemplate == null) { - self::$cryptoKeyNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}'); - } - - return self::$cryptoKeyNameTemplate; - } - - private static function getInstanceNameTemplate() - { - if (self::$instanceNameTemplate == null) { - self::$instanceNameTemplate = new PathTemplate('projects/{project}/instances/{instance}'); - } - - return self::$instanceNameTemplate; - } - - private static function getLocationNameTemplate() - { - if (self::$locationNameTemplate == null) { - self::$locationNameTemplate = new PathTemplate('projects/{project}/locations/{location}'); - } - - return self::$locationNameTemplate; - } - - private static function getProjectNameTemplate() - { - if (self::$projectNameTemplate == null) { - self::$projectNameTemplate = new PathTemplate('projects/{project}'); - } - - return self::$projectNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'appProfile' => self::getAppProfileNameTemplate(), - 'cluster' => self::getClusterNameTemplate(), - 'cryptoKey' => self::getCryptoKeyNameTemplate(), - 'instance' => self::getInstanceNameTemplate(), - 'location' => self::getLocationNameTemplate(), - 'project' => self::getProjectNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a app_profile - * resource. - * - * @param string $project - * @param string $instance - * @param string $appProfile - * - * @return string The formatted app_profile resource. - */ - public static function appProfileName($project, $instance, $appProfile) - { - return self::getAppProfileNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'app_profile' => $appProfile, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName($project, $instance, $cluster) - { - return self::getClusterNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName($project, $location, $keyRing, $cryptoKey) - { - return self::getCryptoKeyNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName($project, $instance) - { - return self::getInstanceNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * 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($project, $location) - { - return self::getLocationNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * 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($project) - { - return self::getProjectNameTemplate()->render([ - 'project' => $project, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - appProfile: projects/{project}/instances/{instance}/appProfiles/{app_profile} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - instance: projects/{project}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - project: projects/{project} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtableadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Creates an app profile within an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $appProfileId = 'app_profile_id'; - * $appProfile = new AppProfile(); - * $response = $bigtableInstanceAdminClient->createAppProfile($formattedParent, $appProfileId, $appProfile); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance in which to create the new app - * profile. Values are of the form `projects/{project}/instances/{instance}`. - * @param string $appProfileId Required. The ID to be used when referring to the new app profile within - * its instance, e.g., just `myprofile` rather than - * `projects/myproject/instances/myinstance/appProfiles/myprofile`. - * @param AppProfile $appProfile Required. The app profile to be created. - * Fields marked `OutputOnly` will be ignored. - * @param array $optionalArgs { - * Optional. - * - * @type bool $ignoreWarnings - * If true, ignore safety checks when creating the app profile. - * @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 \Google\Cloud\Bigtable\Admin\V2\AppProfile - * - * @throws ApiException if the remote call fails - */ - public function createAppProfile($parent, $appProfileId, $appProfile, array $optionalArgs = []) - { - $request = new CreateAppProfileRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setAppProfileId($appProfileId); - $request->setAppProfile($appProfile); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['ignoreWarnings'])) { - $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateAppProfile', AppProfile::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a cluster within an instance. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $clusterId = 'cluster_id'; - * $cluster = new Cluster(); - * $operationResponse = $bigtableInstanceAdminClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->createCluster($formattedParent, $clusterId, $cluster); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'createCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance in which to create the new - * cluster. Values are of the form `projects/{project}/instances/{instance}`. - * @param string $clusterId Required. The ID to be used when referring to the new cluster within its - * instance, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * @param Cluster $cluster Required. The cluster to be created. - * Fields marked `OutputOnly` must be left blank. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createCluster($parent, $clusterId, $cluster, array $optionalArgs = []) - { - $request = new CreateClusterRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setClusterId($clusterId); - $request->setCluster($cluster); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Create an instance within a project. - * - * Note that exactly one of Cluster.serve_nodes and - * Cluster.cluster_config.cluster_autoscaling_config can be set. If - * serve_nodes is set to non-zero, then the cluster is manually scaled. If - * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is - * enabled. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->projectName('[PROJECT]'); - * $instanceId = 'instance_id'; - * $instance = new Instance(); - * $clusters = []; - * $operationResponse = $bigtableInstanceAdminClient->createInstance($formattedParent, $instanceId, $instance, $clusters); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->createInstance($formattedParent, $instanceId, $instance, $clusters); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'createInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the project in which to create the new - * instance. Values are of the form `projects/{project}`. - * @param string $instanceId Required. The ID to be used when referring to the new instance within its - * project, e.g., just `myinstance` rather than - * `projects/myproject/instances/myinstance`. - * @param Instance $instance Required. The instance to create. - * Fields marked `OutputOnly` must be left blank. - * @param array $clusters Required. The clusters to be created within the instance, mapped by desired - * cluster ID, e.g., just `mycluster` rather than - * `projects/myproject/instances/myinstance/clusters/mycluster`. - * Fields marked `OutputOnly` must be left blank. - * Currently, at most four clusters can be specified. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createInstance($parent, $instanceId, $instance, $clusters, array $optionalArgs = []) - { - $request = new CreateInstanceRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setInstanceId($instanceId); - $request->setInstance($instance); - $request->setClusters($clusters); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes an app profile from an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - * $ignoreWarnings = false; - * $bigtableInstanceAdminClient->deleteAppProfile($formattedName, $ignoreWarnings); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the app profile to be deleted. Values are of - * the form - * `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * @param bool $ignoreWarnings Required. If true, ignore safety checks when deleting the app profile. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteAppProfile($name, $ignoreWarnings, array $optionalArgs = []) - { - $request = new DeleteAppProfileRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setIgnoreWarnings($ignoreWarnings); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteAppProfile', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Deletes a cluster from an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * $bigtableInstanceAdminClient->deleteCluster($formattedName); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the cluster to be deleted. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteCluster($name, array $optionalArgs = []) - { - $request = new DeleteClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteCluster', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Delete an instance from a project. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $bigtableInstanceAdminClient->deleteInstance($formattedName); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the instance to be deleted. - * Values are of the form `projects/{project}/instances/{instance}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteInstance($name, array $optionalArgs = []) - { - $request = new DeleteInstanceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteInstance', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about an app profile. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - * $response = $bigtableInstanceAdminClient->getAppProfile($formattedName); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the requested app profile. Values are of the - * form `projects/{project}/instances/{instance}/appProfiles/{app_profile}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\AppProfile - * - * @throws ApiException if the remote call fails - */ - public function getAppProfile($name, array $optionalArgs = []) - { - $request = new GetAppProfileRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetAppProfile', AppProfile::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about a cluster. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * $response = $bigtableInstanceAdminClient->getCluster($formattedName); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the requested cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\Cluster - * - * @throws ApiException if the remote call fails - */ - public function getCluster($name, array $optionalArgs = []) - { - $request = new GetClusterRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetCluster', Cluster::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for an instance resource. Returns an empty - * policy if an instance exists but does not have a policy set. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $resource = 'resource'; - * $response = $bigtableInstanceAdminClient->getIamPolicy($resource); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets information about an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedName = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $response = $bigtableInstanceAdminClient->getInstance($formattedName); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the requested instance. Values are of the form - * `projects/{project}/instances/{instance}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\Instance - * - * @throws ApiException if the remote call fails - */ - public function getInstance($name, array $optionalArgs = []) - { - $request = new GetInstanceRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetInstance', Instance::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists information about app profiles in an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * // Iterate over pages of elements - * $pagedResponse = $bigtableInstanceAdminClient->listAppProfiles($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $bigtableInstanceAdminClient->listAppProfiles($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance for which a list of app profiles - * is requested. Values are of the form - * `projects/{project}/instances/{instance}`. - * Use `{instance} = '-'` to list AppProfiles for all Instances in a project, - * e.g., `projects/myproject/instances/-`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listAppProfiles($parent, array $optionalArgs = []) - { - $request = new ListAppProfilesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListAppProfiles', $optionalArgs, ListAppProfilesResponse::class, $request); - } - - /** - * Lists information about clusters in an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $response = $bigtableInstanceAdminClient->listClusters($formattedParent); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance for which a list of clusters is - * requested. Values are of the form - * `projects/{project}/instances/{instance}`. Use `{instance} = '-'` to list - * Clusters for all Instances in a project, e.g., - * `projects/myproject/instances/-`. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * DEPRECATED: This field is unused and ignored. - * @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 \Google\Cloud\Bigtable\Admin\V2\ListClustersResponse - * - * @throws ApiException if the remote call fails - */ - public function listClusters($parent, array $optionalArgs = []) - { - $request = new ListClustersRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListClusters', ListClustersResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists hot tablets in a cluster, within the time range provided. Hot - * tablets are ordered based on CPU usage. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * // Iterate over pages of elements - * $pagedResponse = $bigtableInstanceAdminClient->listHotTablets($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $bigtableInstanceAdminClient->listHotTablets($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The cluster name to list hot tablets. - * Value is in the following form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param array $optionalArgs { - * Optional. - * - * @type Timestamp $startTime - * The start time to list hot tablets. The hot tablets in the response will - * have start times between the requested start time and end time. Start time - * defaults to Now if it is unset, and end time defaults to Now - 24 hours if - * it is unset. The start time should be less than the end time, and the - * maximum allowed time range between start time and end time is 48 hours. - * Start time and end time should have values between Now and Now - 14 days. - * @type Timestamp $endTime - * The end time to list hot tablets. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listHotTablets($parent, array $optionalArgs = []) - { - $request = new ListHotTabletsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['startTime'])) { - $request->setStartTime($optionalArgs['startTime']); - } - - if (isset($optionalArgs['endTime'])) { - $request->setEndTime($optionalArgs['endTime']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListHotTablets', $optionalArgs, ListHotTabletsResponse::class, $request); - } - - /** - * Lists information about instances in a project. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $formattedParent = $bigtableInstanceAdminClient->projectName('[PROJECT]'); - * $response = $bigtableInstanceAdminClient->listInstances($formattedParent); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the project for which a list of instances is - * requested. Values are of the form `projects/{project}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $pageToken - * DEPRECATED: This field is unused and ignored. - * @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 \Google\Cloud\Bigtable\Admin\V2\ListInstancesResponse - * - * @throws ApiException if the remote call fails - */ - public function listInstances($parent, array $optionalArgs = []) - { - $request = new ListInstancesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ListInstances', ListInstancesResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Partially updates a cluster within a project. This method is the preferred - * way to update a Cluster. - * - * To enable and update autoscaling, set - * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, - * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it - * are ignored. Note that an update cannot simultaneously set serve_nodes to - * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and - * also specify both in the update_mask. - * - * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, - * and explicitly set a serve_node count via the update_mask. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $cluster = new Cluster(); - * $updateMask = new FieldMask(); - * $operationResponse = $bigtableInstanceAdminClient->partialUpdateCluster($cluster, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->partialUpdateCluster($cluster, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'partialUpdateCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param Cluster $cluster Required. The Cluster which contains the partial updates to be applied, - * subject to the update_mask. - * @param FieldMask $updateMask Required. The subset of Cluster fields which should be replaced. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function partialUpdateCluster($cluster, $updateMask, array $optionalArgs = []) - { - $request = new PartialUpdateClusterRequest(); - $requestParamHeaders = []; - $request->setCluster($cluster); - $request->setUpdateMask($updateMask); - $requestParamHeaders['cluster.name'] = $cluster->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('PartialUpdateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Partially updates an instance within a project. This method can modify all - * fields of an Instance and is the preferred way to update an Instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $instance = new Instance(); - * $updateMask = new FieldMask(); - * $operationResponse = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->partialUpdateInstance($instance, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'partialUpdateInstance'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param Instance $instance Required. The Instance which will (partially) replace the current value. - * @param FieldMask $updateMask Required. The subset of Instance fields which should be replaced. - * Must be explicitly set. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function partialUpdateInstance($instance, $updateMask, array $optionalArgs = []) - { - $request = new PartialUpdateInstanceRequest(); - $requestParamHeaders = []; - $request->setInstance($instance); - $request->setUpdateMask($updateMask); - $requestParamHeaders['instance.name'] = $instance->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('PartialUpdateInstance', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Sets the access control policy on an instance resource. Replaces any - * existing policy. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $bigtableInstanceAdminClient->setIamPolicy($resource, $policy); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Returns permissions that the caller has on the specified instance resource. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $bigtableInstanceAdminClient->testIamPermissions($resource, $permissions); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates an app profile within an instance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $appProfile = new AppProfile(); - * $updateMask = new FieldMask(); - * $operationResponse = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->updateAppProfile($appProfile, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'updateAppProfile'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param AppProfile $appProfile Required. The app profile which will (partially) replace the current value. - * @param FieldMask $updateMask Required. The subset of app profile fields which should be replaced. - * If unset, all fields will be replaced. - * @param array $optionalArgs { - * Optional. - * - * @type bool $ignoreWarnings - * If true, ignore safety checks when updating the app profile. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateAppProfile($appProfile, $updateMask, array $optionalArgs = []) - { - $request = new UpdateAppProfileRequest(); - $requestParamHeaders = []; - $request->setAppProfile($appProfile); - $request->setUpdateMask($updateMask); - $requestParamHeaders['app_profile.name'] = $appProfile->getName(); - if (isset($optionalArgs['ignoreWarnings'])) { - $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateAppProfile', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a cluster within an instance. - * - * Note that UpdateCluster does not support updating - * cluster_config.cluster_autoscaling_config. In order to update it, you - * must use PartialUpdateCluster. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $name = 'name'; - * $serveNodes = 0; - * $operationResponse = $bigtableInstanceAdminClient->updateCluster($name, $serveNodes); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableInstanceAdminClient->updateCluster($name, $serveNodes); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableInstanceAdminClient->resumeOperation($operationName, 'updateCluster'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name The unique name of the cluster. Values are of the form - * `projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*`. - * @param int $serveNodes The number of nodes allocated to this cluster. More nodes enable higher - * throughput and more consistent performance. - * @param array $optionalArgs { - * Optional. - * - * @type string $location - * Immutable. The location where this cluster's nodes and storage reside. For - * best performance, clients should be located as close as possible to this - * cluster. Currently only zones are supported, so values should be of the - * form `projects/{project}/locations/{zone}`. - * @type int $state - * Output only. The current state of the cluster. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\Cluster\State} - * @type ClusterConfig $clusterConfig - * Configuration for this cluster. - * @type int $defaultStorageType - * Immutable. The type of storage used by this cluster to serve its - * parent instance's tables, unless explicitly overridden. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\StorageType} - * @type EncryptionConfig $encryptionConfig - * Immutable. The encryption configuration for CMEK-protected clusters. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateCluster($name, $serveNodes, array $optionalArgs = []) - { - $request = new Cluster(); - $requestParamHeaders = []; - $request->setName($name); - $request->setServeNodes($serveNodes); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['location'])) { - $request->setLocation($optionalArgs['location']); - } - - if (isset($optionalArgs['state'])) { - $request->setState($optionalArgs['state']); - } - - if (isset($optionalArgs['clusterConfig'])) { - $request->setClusterConfig($optionalArgs['clusterConfig']); - } - - if (isset($optionalArgs['defaultStorageType'])) { - $request->setDefaultStorageType($optionalArgs['defaultStorageType']); - } - - if (isset($optionalArgs['encryptionConfig'])) { - $request->setEncryptionConfig($optionalArgs['encryptionConfig']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateCluster', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates an instance within a project. This method updates only the display - * name and type for an Instance. To update other Instance properties, such as - * labels, use PartialUpdateInstance. - * - * Sample code: - * ``` - * $bigtableInstanceAdminClient = new BigtableInstanceAdminClient(); - * try { - * $name = 'name'; - * $displayName = 'display_name'; - * $type = Type::TYPE_UNSPECIFIED; - * $labels = []; - * $response = $bigtableInstanceAdminClient->updateInstance($name, $displayName, $type, $labels); - * } finally { - * $bigtableInstanceAdminClient->close(); - * } - * ``` - * - * @param string $name The unique name of the instance. Values are of the form - * `projects/{project}/instances/[a-z][a-z0-9\\-]+[a-z0-9]`. - * @param string $displayName Required. The descriptive name for this instance as it appears in UIs. - * Can be changed at any time, but should be kept globally unique - * to avoid confusion. - * @param int $type The type of the instance. Defaults to `PRODUCTION`. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\Instance\Type} - * @param array $labels Labels are a flexible and lightweight mechanism for organizing cloud - * resources into groups that reflect a customer's organizational needs and - * deployment strategies. They can be used to filter resources and aggregate - * metrics. - * - * * Label keys must be between 1 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`. - * * Label values must be between 0 and 63 characters long and must conform to - * the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`. - * * No more than 64 labels can be associated with a given resource. - * * Keys and values must both be under 128 bytes. - * @param array $optionalArgs { - * Optional. - * - * @type int $state - * (`OutputOnly`) - * The current state of the instance. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\Instance\State} - * @type Timestamp $createTime - * Output only. A server-assigned timestamp representing when this Instance - * was created. For instances created before this field was added (August - * 2021), this value is `seconds: 0, nanos: 1`. - * @type bool $satisfiesPzs - * Output only. Reserved for future use. - * @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 \Google\Cloud\Bigtable\Admin\V2\Instance - * - * @throws ApiException if the remote call fails - */ - public function updateInstance($name, $displayName, $type, $labels, array $optionalArgs = []) - { - $request = new Instance(); - $requestParamHeaders = []; - $request->setName($name); - $request->setDisplayName($displayName); - $request->setType($type); - $request->setLabels($labels); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['state'])) { - $request->setState($optionalArgs['state']); - } - - if (isset($optionalArgs['createTime'])) { - $request->setCreateTime($optionalArgs['createTime']); - } - - if (isset($optionalArgs['satisfiesPzs'])) { - $request->setSatisfiesPzs($optionalArgs['satisfiesPzs']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateInstance', Instance::class, $optionalArgs, $request)->wait(); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableTableAdminGapicClient.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableTableAdminGapicClient.php deleted file mode 100644 index 081f6c7161f0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/Gapic/BigtableTableAdminGapicClient.php +++ /dev/null @@ -1,2112 +0,0 @@ -tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $consistencyToken = 'consistency_token'; - * $response = $bigtableTableAdminClient->checkConsistency($formattedName, $consistencyToken); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Bigtable\Admin\V2\Client\BigtableTableAdminClient} to use the new - * surface. - */ -class BigtableTableAdminGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.bigtable.admin.v2.BigtableTableAdmin'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'bigtableadmin.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.admin', - 'https://www.googleapis.com/auth/bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-bigtable.admin', - 'https://www.googleapis.com/auth/cloud-bigtable.admin.table', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private static $backupNameTemplate; - - private static $clusterNameTemplate; - - private static $cryptoKeyVersionNameTemplate; - - private static $instanceNameTemplate; - - private static $snapshotNameTemplate; - - private static $tableNameTemplate; - - private static $pathTemplateMap; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_table_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_table_admin_rest_client_config.php', - ], - ], - ]; - } - - private static function getBackupNameTemplate() - { - if (self::$backupNameTemplate == null) { - self::$backupNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}'); - } - - return self::$backupNameTemplate; - } - - private static function getClusterNameTemplate() - { - if (self::$clusterNameTemplate == null) { - self::$clusterNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/clusters/{cluster}'); - } - - return self::$clusterNameTemplate; - } - - private static function getCryptoKeyVersionNameTemplate() - { - if (self::$cryptoKeyVersionNameTemplate == null) { - self::$cryptoKeyVersionNameTemplate = new PathTemplate('projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}'); - } - - return self::$cryptoKeyVersionNameTemplate; - } - - private static function getInstanceNameTemplate() - { - if (self::$instanceNameTemplate == null) { - self::$instanceNameTemplate = new PathTemplate('projects/{project}/instances/{instance}'); - } - - return self::$instanceNameTemplate; - } - - private static function getSnapshotNameTemplate() - { - if (self::$snapshotNameTemplate == null) { - self::$snapshotNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}'); - } - - return self::$snapshotNameTemplate; - } - - private static function getTableNameTemplate() - { - if (self::$tableNameTemplate == null) { - self::$tableNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/tables/{table}'); - } - - return self::$tableNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'backup' => self::getBackupNameTemplate(), - 'cluster' => self::getClusterNameTemplate(), - 'cryptoKeyVersion' => self::getCryptoKeyVersionNameTemplate(), - 'instance' => self::getInstanceNameTemplate(), - 'snapshot' => self::getSnapshotNameTemplate(), - 'table' => self::getTableNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName($project, $instance, $cluster, $backup) - { - return self::getBackupNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName($project, $instance, $cluster) - { - return self::getClusterNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * crypto_key_version resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * @param string $cryptoKeyVersion - * - * @return string The formatted crypto_key_version resource. - */ - public static function cryptoKeyVersionName($project, $location, $keyRing, $cryptoKey, $cryptoKeyVersion) - { - return self::getCryptoKeyVersionNameTemplate()->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - 'crypto_key_version' => $cryptoKeyVersion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName($project, $instance) - { - return self::getInstanceNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a snapshot - * resource. - * - * @param string $project - * @param string $instance - * @param string $cluster - * @param string $snapshot - * - * @return string The formatted snapshot resource. - */ - public static function snapshotName($project, $instance, $cluster, $snapshot) - { - return self::getSnapshotNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'cluster' => $cluster, - 'snapshot' => $snapshot, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName($project, $instance, $table) - { - return self::getTableNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * 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}/instances/{instance}/clusters/{cluster}/backups/{backup} - * - cluster: projects/{project}/instances/{instance}/clusters/{cluster} - * - cryptoKeyVersion: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version} - * - instance: projects/{project}/instances/{instance} - * - snapshot: projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = isset($this->descriptors[$methodName]['longRunning']) ? $this->descriptors[$methodName]['longRunning'] : []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtableadmin.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** - * Checks replication consistency based on a consistency token, that is, if - * replication has caught up based on the conditions specified in the token - * and the check request. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $consistencyToken = 'consistency_token'; - * $response = $bigtableTableAdminClient->checkConsistency($formattedName, $consistencyToken); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the Table for which to check replication - * consistency. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param string $consistencyToken Required. The token created using GenerateConsistencyToken for the Table. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse - * - * @throws ApiException if the remote call fails - */ - public function checkConsistency($name, $consistencyToken, array $optionalArgs = []) - { - $request = new CheckConsistencyRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setConsistencyToken($consistencyToken); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CheckConsistency', CheckConsistencyResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Copy a Cloud Bigtable backup to a new backup in the destination cluster - * located in the destination instance and project. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * $backupId = 'backup_id'; - * $formattedSourceBackup = $bigtableTableAdminClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - * $expireTime = new Timestamp(); - * $operationResponse = $bigtableTableAdminClient->copyBackup($formattedParent, $backupId, $formattedSourceBackup, $expireTime); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->copyBackup($formattedParent, $backupId, $formattedSourceBackup, $expireTime); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'copyBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the destination cluster that will contain the backup - * copy. The cluster must already exists. Values are of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param string $backupId Required. The id of the new backup. The `backup_id` along with `parent` - * are combined as {parent}/backups/{backup_id} to create the full backup - * name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param string $sourceBackup Required. The source backup to be copied from. - * The source backup needs to be in READY state for it to be copied. - * Copying a copied backup is not allowed. - * Once CopyBackup is in progress, the source backup cannot be deleted or - * cleaned up on expiration until CopyBackup is finished. - * Values are of the form: - * `projects//instances//clusters//backups/`. - * @param Timestamp $expireTime Required. Required. The expiration time of the copied backup with - * microsecond granularity that must be at least 6 hours and at most 30 days - * from the time the request is received. Once the `expire_time` has - * passed, Cloud Bigtable will delete the backup and free the resources used - * by the backup. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function copyBackup($parent, $backupId, $sourceBackup, $expireTime, array $optionalArgs = []) - { - $request = new CopyBackupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBackupId($backupId); - $request->setSourceBackup($sourceBackup); - $request->setExpireTime($expireTime); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CopyBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Starts creating a new Cloud Bigtable Backup. The returned backup - * [long-running operation][google.longrunning.Operation] can be used to - * track creation of the backup. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [CreateBackupMetadata][google.bigtable.admin.v2.CreateBackupMetadata]. The - * [response][google.longrunning.Operation.response] field type is - * [Backup][google.bigtable.admin.v2.Backup], if successful. Cancelling the - * returned operation will stop the creation and delete the backup. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * $backupId = 'backup_id'; - * $backup = new Backup(); - * $operationResponse = $bigtableTableAdminClient->createBackup($formattedParent, $backupId, $backup); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->createBackup($formattedParent, $backupId, $backup); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'createBackup'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. This must be one of the clusters in the instance in which this - * table is located. The backup will be stored in this cluster. Values are - * of the form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param string $backupId Required. The id of the backup to be created. The `backup_id` along with - * the parent `parent` are combined as {parent}/backups/{backup_id} to create - * the full backup name, of the form: - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup_id}`. - * This string must be between 1 and 50 characters in length and match the - * regex [_a-zA-Z0-9][-_.a-zA-Z0-9]*. - * @param Backup $backup Required. The backup to create. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createBackup($parent, $backupId, $backup, array $optionalArgs = []) - { - $request = new CreateBackupRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setBackupId($backupId); - $request->setBackup($backup); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateBackup', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Creates a new table in the specified instance. - * The table can be created with a full set of initial column families, - * specified in the request. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $tableId = 'table_id'; - * $table = new Table(); - * $response = $bigtableTableAdminClient->createTable($formattedParent, $tableId, $table); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * Maximum 50 characters. - * @param Table $table Required. The Table to create. - * @param array $optionalArgs { - * Optional. - * - * @type Split[] $initialSplits - * The optional list of row keys that will be used to initially split the - * table into several tablets (tablets are similar to HBase regions). - * Given two split keys, `s1` and `s2`, three tablets will be created, - * spanning the key ranges: `[, s1), [s1, s2), [s2, )`. - * - * Example: - * - * * Row keys := `["a", "apple", "custom", "customer_1", "customer_2",` - * `"other", "zz"]` - * * initial_split_keys := `["apple", "customer_1", "customer_2", "other"]` - * * Key assignment: - * - Tablet 1 `[, apple) => {"a"}.` - * - Tablet 2 `[apple, customer_1) => {"apple", "custom"}.` - * - Tablet 3 `[customer_1, customer_2) => {"customer_1"}.` - * - Tablet 4 `[customer_2, other) => {"customer_2"}.` - * - Tablet 5 `[other, ) => {"other", "zz"}.` - * @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 \Google\Cloud\Bigtable\Admin\V2\Table - * - * @throws ApiException if the remote call fails - */ - public function createTable($parent, $tableId, $table, array $optionalArgs = []) - { - $request = new CreateTableRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTableId($tableId); - $request->setTable($table); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['initialSplits'])) { - $request->setInitialSplits($optionalArgs['initialSplits']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CreateTable', Table::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new table from the specified snapshot. The target table must - * not exist. The snapshot and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $tableId = 'table_id'; - * $formattedSourceSnapshot = $bigtableTableAdminClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - * $operationResponse = $bigtableTableAdminClient->createTableFromSnapshot($formattedParent, $tableId, $formattedSourceSnapshot); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->createTableFromSnapshot($formattedParent, $tableId, $formattedSourceSnapshot); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'createTableFromSnapshot'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance in which to create the table. - * Values are of the form `projects/{project}/instances/{instance}`. - * @param string $tableId Required. The name by which the new table should be referred to within the - * parent instance, e.g., `foobar` rather than `{parent}/tables/foobar`. - * @param string $sourceSnapshot Required. The unique name of the snapshot from which to restore the table. - * The snapshot and the table must be in the same instance. Values are of the - * form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function createTableFromSnapshot($parent, $tableId, $sourceSnapshot, array $optionalArgs = []) - { - $request = new CreateTableFromSnapshotRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTableId($tableId); - $request->setSourceSnapshot($sourceSnapshot); - $requestParamHeaders['parent'] = $parent; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('CreateTableFromSnapshot', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Deletes a pending or completed Cloud Bigtable backup. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - * $bigtableTableAdminClient->deleteBackup($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the backup to delete. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteBackup($name, array $optionalArgs = []) - { - $request = new DeleteBackupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteBackup', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - * $bigtableTableAdminClient->deleteSnapshot($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the snapshot to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteSnapshot($name, array $optionalArgs = []) - { - $request = new DeleteSnapshotRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteSnapshot', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently deletes a specified table and all of its data. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $bigtableTableAdminClient->deleteTable($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the table to be deleted. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param array $optionalArgs { - * 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 if the remote call fails - */ - public function deleteTable($name, array $optionalArgs = []) - { - $request = new DeleteTableRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DeleteTable', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Permanently drop/delete a row range from a specified table. The request can - * specify whether to delete all rows in a table, or only those that match a - * particular prefix. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $bigtableTableAdminClient->dropRowRange($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the table on which to drop a range of rows. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param array $optionalArgs { - * Optional. - * - * @type string $rowKeyPrefix - * Delete all rows that start with this row key prefix. Prefix cannot be - * zero length. - * @type bool $deleteAllDataFromTable - * Delete all rows in the table. Setting this to false is a no-op. - * @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 if the remote call fails - */ - public function dropRowRange($name, array $optionalArgs = []) - { - $request = new DropRowRangeRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['rowKeyPrefix'])) { - $request->setRowKeyPrefix($optionalArgs['rowKeyPrefix']); - } - - if (isset($optionalArgs['deleteAllDataFromTable'])) { - $request->setDeleteAllDataFromTable($optionalArgs['deleteAllDataFromTable']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('DropRowRange', GPBEmpty::class, $optionalArgs, $request)->wait(); - } - - /** - * Generates a consistency token for a Table, which can be used in - * CheckConsistency to check whether mutations to the table that finished - * before this call started have been replicated. The tokens will be available - * for 90 days. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $response = $bigtableTableAdminClient->generateConsistencyToken($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the Table for which to create a consistency - * token. Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse - * - * @throws ApiException if the remote call fails - */ - public function generateConsistencyToken($name, array $optionalArgs = []) - { - $request = new GenerateConsistencyTokenRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateConsistencyToken', GenerateConsistencyTokenResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets metadata on a pending or completed Cloud Bigtable Backup. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - * $response = $bigtableTableAdminClient->getBackup($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. Name of the backup. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\Backup - * - * @throws ApiException if the remote call fails - */ - public function getBackup($name, array $optionalArgs = []) - { - $request = new GetBackupRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetBackup', Backup::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets the access control policy for a Table or Backup resource. - * Returns an empty policy if the resource exists but does not have a policy - * set. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $resource = 'resource'; - * $response = $bigtableTableAdminClient->getIamPolicy($resource); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being requested. - * See the operation documentation for the appropriate value for this field. - * @param array $optionalArgs { - * Optional. - * - * @type GetPolicyOptions $options - * OPTIONAL: A `GetPolicyOptions` object for specifying options to - * `GetIamPolicy`. - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function getIamPolicy($resource, array $optionalArgs = []) - { - $request = new GetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['options'])) { - $request->setOptions($optionalArgs['options']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets metadata information about the specified snapshot. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - * $response = $bigtableTableAdminClient->getSnapshot($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the requested snapshot. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}`. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\Snapshot - * - * @throws ApiException if the remote call fails - */ - public function getSnapshot($name, array $optionalArgs = []) - { - $request = new GetSnapshotRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetSnapshot', Snapshot::class, $optionalArgs, $request)->wait(); - } - - /** - * Gets metadata information about the specified table. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $response = $bigtableTableAdminClient->getTable($formattedName); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the requested table. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * The view to be applied to the returned table's fields. - * Defaults to `SCHEMA_VIEW` if unspecified. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\Table\View} - * @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 \Google\Cloud\Bigtable\Admin\V2\Table - * - * @throws ApiException if the remote call fails - */ - public function getTable($name, array $optionalArgs = []) - { - $request = new GetTableRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GetTable', Table::class, $optionalArgs, $request)->wait(); - } - - /** - * Lists Cloud Bigtable backups. Returns both completed and pending - * backups. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * // Iterate over pages of elements - * $pagedResponse = $bigtableTableAdminClient->listBackups($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $bigtableTableAdminClient->listBackups($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The cluster to list backups from. Values are of the - * form `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list backups for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @param array $optionalArgs { - * Optional. - * - * @type string $filter - * A filter expression that filters backups listed in the response. - * The expression must specify the field name, a comparison operator, - * and the value that you want to use for filtering. The value must be a - * string, a number, or a boolean. The comparison operator must be - * <, >, <=, >=, !=, =, or :. Colon ':' represents a HAS operator which is - * roughly synonymous with equality. Filter rules are case insensitive. - * - * The fields eligible for filtering are: - * - * * `name` - * * `source_table` - * * `state` - * * `start_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `end_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) - * * `size_bytes` - * - * To filter on multiple expressions, provide each separate expression within - * parentheses. By default, each expression is an AND expression. However, - * you can include AND, OR, and NOT expressions explicitly. - * - * Some examples of using filters are: - * - * * `name:"exact"` --> The backup's name is the string "exact". - * * `name:howl` --> The backup's name contains the string "howl". - * * `source_table:prod` - * --> The source_table's name contains the string "prod". - * * `state:CREATING` --> The backup is pending creation. - * * `state:READY` --> The backup is fully created and ready for use. - * * `(name:howl) AND (start_time < \"2018-03-28T14:50:00Z\")` - * --> The backup name contains the string "howl" and start_time - * of the backup is before 2018-03-28T14:50:00Z. - * * `size_bytes > 10000000000` --> The backup's size is greater than 10GB - * @type string $orderBy - * An expression for specifying the sort order of the results of the request. - * The string value should specify one or more fields in - * [Backup][google.bigtable.admin.v2.Backup]. The full syntax is described at - * https://aip.dev/132#ordering. - * - * Fields supported are: - * - * * name - * * source_table - * * expire_time - * * start_time - * * end_time - * * size_bytes - * * state - * - * For example, "start_time". The default sorting order is ascending. - * To specify descending order for the field, a suffix " desc" should - * be appended to the field name. For example, "start_time desc". - * Redundant space characters in the syntax are insigificant. - * - * If order_by is empty, results will be sorted by `start_time` in descending - * order starting from the most recently created backup. - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listBackups($parent, array $optionalArgs = []) - { - $request = new ListBackupsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['orderBy'])) { - $request->setOrderBy($optionalArgs['orderBy']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListBackups', $optionalArgs, ListBackupsResponse::class, $request); - } - - /** - * Lists all snapshots associated with the specified cluster. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * // Iterate over pages of elements - * $pagedResponse = $bigtableTableAdminClient->listSnapshots($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $bigtableTableAdminClient->listSnapshots($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the cluster for which snapshots should be - * listed. Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * Use `{cluster} = '-'` to list snapshots for all clusters in an instance, - * e.g., `projects/{project}/instances/{instance}/clusters/-`. - * @param array $optionalArgs { - * Optional. - * - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listSnapshots($parent, array $optionalArgs = []) - { - $request = new ListSnapshotsRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListSnapshots', $optionalArgs, ListSnapshotsResponse::class, $request); - } - - /** - * Lists all tables served from a specified instance. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * // Iterate over pages of elements - * $pagedResponse = $bigtableTableAdminClient->listTables($formattedParent); - * foreach ($pagedResponse->iteratePages() as $page) { - * foreach ($page as $element) { - * // doSomethingWith($element); - * } - * } - * // Alternatively: - * // Iterate through all elements - * $pagedResponse = $bigtableTableAdminClient->listTables($formattedParent); - * foreach ($pagedResponse->iterateAllElements() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The unique name of the instance for which tables should be - * listed. Values are of the form `projects/{project}/instances/{instance}`. - * @param array $optionalArgs { - * Optional. - * - * @type int $view - * The view to be applied to the returned tables' fields. - * NAME_ONLY view (default) and REPLICATION_VIEW are supported. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\Admin\V2\Table\View} - * @type int $pageSize - * The maximum number of resources contained in the underlying API - * response. The API may return fewer values in a page, even if - * there are additional values to be retrieved. - * @type string $pageToken - * A page token is used to specify a page of values to be returned. - * If no page token is specified (the default), the first page - * of values will be returned. Any page token used here must have - * been generated by a previous call to the API. - * @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 \Google\ApiCore\PagedListResponse - * - * @throws ApiException if the remote call fails - */ - public function listTables($parent, array $optionalArgs = []) - { - $request = new ListTablesRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['view'])) { - $request->setView($optionalArgs['view']); - } - - if (isset($optionalArgs['pageSize'])) { - $request->setPageSize($optionalArgs['pageSize']); - } - - if (isset($optionalArgs['pageToken'])) { - $request->setPageToken($optionalArgs['pageToken']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->getPagedListResponse('ListTables', $optionalArgs, ListTablesResponse::class, $request); - } - - /** - * Performs a series of column family modifications on the specified table. - * Either all or none of the modifications will occur before this method - * returns, but data requests received prior to that point may see a table - * where only some modifications have taken effect. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $modifications = []; - * $response = $bigtableTableAdminClient->modifyColumnFamilies($formattedName, $modifications); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the table whose families should be modified. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param Modification[] $modifications Required. Modifications to be atomically applied to the specified table's - * families. Entries are applied in order, meaning that earlier modifications - * can be masked by later ones (in the case of repeated updates to the same - * family, for example). - * @param array $optionalArgs { - * Optional. - * - * @type bool $ignoreWarnings - * Optional. If true, ignore safety checks when modifying the column families. - * @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 \Google\Cloud\Bigtable\Admin\V2\Table - * - * @throws ApiException if the remote call fails - */ - public function modifyColumnFamilies($name, $modifications, array $optionalArgs = []) - { - $request = new ModifyColumnFamiliesRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setModifications($modifications); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['ignoreWarnings'])) { - $request->setIgnoreWarnings($optionalArgs['ignoreWarnings']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ModifyColumnFamilies', Table::class, $optionalArgs, $request)->wait(); - } - - /** - * Create a new table by restoring from a completed backup. The - * returned table [long-running operation][google.longrunning.Operation] can - * be used to track the progress of the operation, and to cancel it. The - * [metadata][google.longrunning.Operation.metadata] field type is - * [RestoreTableMetadata][google.bigtable.admin.RestoreTableMetadata]. The - * [response][google.longrunning.Operation.response] type is - * [Table][google.bigtable.admin.v2.Table], if successful. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedParent = $bigtableTableAdminClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $tableId = 'table_id'; - * $operationResponse = $bigtableTableAdminClient->restoreTable($formattedParent, $tableId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->restoreTable($formattedParent, $tableId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'restoreTable'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $parent Required. The name of the instance in which to create the restored - * table. Values are of the form `projects//instances/`. - * @param string $tableId Required. The id of the table to create and restore to. This - * table must not already exist. The `table_id` appended to - * `parent` forms the full table name of the form - * `projects//instances//tables/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $backup - * Name of the backup from which to restore. Values are of the form - * `projects//instances//clusters//backups/`. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function restoreTable($parent, $tableId, array $optionalArgs = []) - { - $request = new RestoreTableRequest(); - $requestParamHeaders = []; - $request->setParent($parent); - $request->setTableId($tableId); - $requestParamHeaders['parent'] = $parent; - if (isset($optionalArgs['backup'])) { - $request->setBackup($optionalArgs['backup']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('RestoreTable', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Sets the access control policy on a Table or Backup resource. - * Replaces any existing policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $resource = 'resource'; - * $policy = new Policy(); - * $response = $bigtableTableAdminClient->setIamPolicy($resource, $policy); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy is being specified. - * See the operation documentation for the appropriate value for this field. - * @param Policy $policy REQUIRED: The complete policy to be applied to the `resource`. The size of - * the policy is limited to a few 10s of KB. An empty policy is a - * valid policy but certain Cloud Platform services (such as Projects) - * might reject them. - * @param array $optionalArgs { - * Optional. - * - * @type FieldMask $updateMask - * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only - * the fields in the mask will be modified. If no mask is provided, the - * following default mask is used: - * - * `paths: "bindings, etag"` - * @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 \Google\Cloud\Iam\V1\Policy - * - * @throws ApiException if the remote call fails - */ - public function setIamPolicy($resource, $policy, array $optionalArgs = []) - { - $request = new SetIamPolicyRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPolicy($policy); - $requestParamHeaders['resource'] = $resource; - if (isset($optionalArgs['updateMask'])) { - $request->setUpdateMask($optionalArgs['updateMask']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SetIamPolicy', Policy::class, $optionalArgs, $request)->wait(); - } - - /** - * Creates a new snapshot in the specified cluster from the specified - * source table. The cluster and the table must be in the same instance. - * - * Note: This is a private alpha release of Cloud Bigtable snapshots. This - * feature is not currently available to most Cloud Bigtable customers. This - * feature might be changed in backward-incompatible ways and is not - * recommended for production use. It is not subject to any SLA or deprecation - * policy. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $formattedCluster = $bigtableTableAdminClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - * $snapshotId = 'snapshot_id'; - * $operationResponse = $bigtableTableAdminClient->snapshotTable($formattedName, $formattedCluster, $snapshotId); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->snapshotTable($formattedName, $formattedCluster, $snapshotId); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'snapshotTable'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the table to have the snapshot taken. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param string $cluster Required. The name of the cluster where the snapshot will be created in. - * Values are of the form - * `projects/{project}/instances/{instance}/clusters/{cluster}`. - * @param string $snapshotId Required. The ID by which the new snapshot should be referred to within the - * parent cluster, e.g., `mysnapshot` of the form: - * `[_a-zA-Z0-9][-_.a-zA-Z0-9]*` rather than - * `projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/mysnapshot`. - * @param array $optionalArgs { - * Optional. - * - * @type Duration $ttl - * The amount of time that the new snapshot can stay active after it is - * created. Once 'ttl' expires, the snapshot will get deleted. The maximum - * amount of time a snapshot can stay active is 7 days. If 'ttl' is not - * specified, the default value of 24 hours will be used. - * @type string $description - * Description of the snapshot. - * @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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function snapshotTable($name, $cluster, $snapshotId, array $optionalArgs = []) - { - $request = new SnapshotTableRequest(); - $requestParamHeaders = []; - $request->setName($name); - $request->setCluster($cluster); - $request->setSnapshotId($snapshotId); - $requestParamHeaders['name'] = $name; - if (isset($optionalArgs['ttl'])) { - $request->setTtl($optionalArgs['ttl']); - } - - if (isset($optionalArgs['description'])) { - $request->setDescription($optionalArgs['description']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('SnapshotTable', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Returns permissions that the caller has on the specified Table or Backup - * resource. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $resource = 'resource'; - * $permissions = []; - * $response = $bigtableTableAdminClient->testIamPermissions($resource, $permissions); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $resource REQUIRED: The resource for which the policy detail is being requested. - * See the operation documentation for the appropriate value for this field. - * @param string[] $permissions The set of permissions to check for the `resource`. Permissions with - * wildcards (such as '*' or 'storage.*') are not allowed. For more - * information see - * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). - * @param array $optionalArgs { - * 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 \Google\Cloud\Iam\V1\TestIamPermissionsResponse - * - * @throws ApiException if the remote call fails - */ - public function testIamPermissions($resource, $permissions, array $optionalArgs = []) - { - $request = new TestIamPermissionsRequest(); - $requestParamHeaders = []; - $request->setResource($resource); - $request->setPermissions($permissions); - $requestParamHeaders['resource'] = $resource; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('TestIamPermissions', TestIamPermissionsResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Restores a specified table which was accidentally deleted. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $formattedName = $bigtableTableAdminClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $operationResponse = $bigtableTableAdminClient->undeleteTable($formattedName); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->undeleteTable($formattedName); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'undeleteTable'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the table to be restored. - * Values are of the form - * `projects/{project}/instances/{instance}/tables/{table}`. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function undeleteTable($name, array $optionalArgs = []) - { - $request = new UndeleteTableRequest(); - $requestParamHeaders = []; - $request->setName($name); - $requestParamHeaders['name'] = $name; - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UndeleteTable', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } - - /** - * Updates a pending or completed Cloud Bigtable Backup. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $backup = new Backup(); - * $updateMask = new FieldMask(); - * $response = $bigtableTableAdminClient->updateBackup($backup, $updateMask); - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param Backup $backup Required. The backup to update. `backup.name`, and the fields to be updated - * as specified by `update_mask` are required. Other fields are ignored. - * Update is only supported for the following fields: - * - * * `backup.expire_time`. - * @param FieldMask $updateMask Required. A mask specifying which fields (e.g. `expire_time`) in the - * Backup resource should be updated. This mask is relative to the Backup - * resource, not to the request message. The field mask must always be - * specified; this prevents any future fields from being erased accidentally - * by clients that do not know about them. - * @param array $optionalArgs { - * 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 \Google\Cloud\Bigtable\Admin\V2\Backup - * - * @throws ApiException if the remote call fails - */ - public function updateBackup($backup, $updateMask, array $optionalArgs = []) - { - $request = new UpdateBackupRequest(); - $requestParamHeaders = []; - $request->setBackup($backup); - $request->setUpdateMask($updateMask); - $requestParamHeaders['backup.name'] = $backup->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('UpdateBackup', Backup::class, $optionalArgs, $request)->wait(); - } - - /** - * Updates a specified table. - * - * Sample code: - * ``` - * $bigtableTableAdminClient = new BigtableTableAdminClient(); - * try { - * $table = new Table(); - * $updateMask = new FieldMask(); - * $operationResponse = $bigtableTableAdminClient->updateTable($table, $updateMask); - * $operationResponse->pollUntilComplete(); - * if ($operationResponse->operationSucceeded()) { - * $result = $operationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $operationResponse->getError(); - * // handleError($error) - * } - * // Alternatively: - * // start the operation, keep the operation name, and resume later - * $operationResponse = $bigtableTableAdminClient->updateTable($table, $updateMask); - * $operationName = $operationResponse->getName(); - * // ... do other work - * $newOperationResponse = $bigtableTableAdminClient->resumeOperation($operationName, 'updateTable'); - * while (!$newOperationResponse->isDone()) { - * // ... do other work - * $newOperationResponse->reload(); - * } - * if ($newOperationResponse->operationSucceeded()) { - * $result = $newOperationResponse->getResult(); - * // doSomethingWith($result) - * } else { - * $error = $newOperationResponse->getError(); - * // handleError($error) - * } - * } finally { - * $bigtableTableAdminClient->close(); - * } - * ``` - * - * @param Table $table Required. The table to update. - * The table's `name` field is used to identify the table to update. - * @param FieldMask $updateMask Required. The list of fields to update. - * A mask specifying which fields (e.g. `change_stream_config`) in the `table` - * field should be updated. This mask is relative to the `table` field, not to - * the request message. The wildcard (*) path is currently not supported. - * Currently UpdateTable is only supported for the following fields: - * - * * `change_stream_config` - * * `change_stream_config.retention_period` - * * `deletion_protection` - * - * If `column_families` is set in `update_mask`, it will return an - * UNIMPLEMENTED error. - * @param array $optionalArgs { - * 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 \Google\ApiCore\OperationResponse - * - * @throws ApiException if the remote call fails - */ - public function updateTable($table, $updateMask, array $optionalArgs = []) - { - $request = new UpdateTableRequest(); - $requestParamHeaders = []; - $request->setTable($table); - $request->setUpdateMask($updateMask); - $requestParamHeaders['table.name'] = $table->getName(); - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startOperationsCall('UpdateTable', $optionalArgs, $request, $this->getOperationsClient())->wait(); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json deleted file mode 100644 index e7da83f8a205..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/gapic_metadata.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.bigtable.admin.v2", - "libraryPackage": "Google\\Cloud\\Bigtable\\Admin\\V2", - "services": { - "BigtableInstanceAdmin": { - "clients": { - "grpc": { - "libraryClient": "BigtableInstanceAdminGapicClient", - "rpcs": { - "CreateAppProfile": { - "methods": [ - "createAppProfile" - ] - }, - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "CreateInstance": { - "methods": [ - "createInstance" - ] - }, - "DeleteAppProfile": { - "methods": [ - "deleteAppProfile" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DeleteInstance": { - "methods": [ - "deleteInstance" - ] - }, - "GetAppProfile": { - "methods": [ - "getAppProfile" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "ListAppProfiles": { - "methods": [ - "listAppProfiles" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "ListHotTablets": { - "methods": [ - "listHotTablets" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "PartialUpdateCluster": { - "methods": [ - "partialUpdateCluster" - ] - }, - "PartialUpdateInstance": { - "methods": [ - "partialUpdateInstance" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UpdateAppProfile": { - "methods": [ - "updateAppProfile" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateInstance": { - "methods": [ - "updateInstance" - ] - } - } - } - } - }, - "BigtableTableAdmin": { - "clients": { - "grpc": { - "libraryClient": "BigtableTableAdminGapicClient", - "rpcs": { - "CheckConsistency": { - "methods": [ - "checkConsistency" - ] - }, - "CopyBackup": { - "methods": [ - "copyBackup" - ] - }, - "CreateBackup": { - "methods": [ - "createBackup" - ] - }, - "CreateTable": { - "methods": [ - "createTable" - ] - }, - "CreateTableFromSnapshot": { - "methods": [ - "createTableFromSnapshot" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteSnapshot": { - "methods": [ - "deleteSnapshot" - ] - }, - "DeleteTable": { - "methods": [ - "deleteTable" - ] - }, - "DropRowRange": { - "methods": [ - "dropRowRange" - ] - }, - "GenerateConsistencyToken": { - "methods": [ - "generateConsistencyToken" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetIamPolicy": { - "methods": [ - "getIamPolicy" - ] - }, - "GetSnapshot": { - "methods": [ - "getSnapshot" - ] - }, - "GetTable": { - "methods": [ - "getTable" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListSnapshots": { - "methods": [ - "listSnapshots" - ] - }, - "ListTables": { - "methods": [ - "listTables" - ] - }, - "ModifyColumnFamilies": { - "methods": [ - "modifyColumnFamilies" - ] - }, - "RestoreTable": { - "methods": [ - "restoreTable" - ] - }, - "SetIamPolicy": { - "methods": [ - "setIamPolicy" - ] - }, - "SnapshotTable": { - "methods": [ - "snapshotTable" - ] - }, - "TestIamPermissions": { - "methods": [ - "testIamPermissions" - ] - }, - "UndeleteTable": { - "methods": [ - "undeleteTable" - ] - }, - "UpdateBackup": { - "methods": [ - "updateBackup" - ] - }, - "UpdateTable": { - "methods": [ - "updateTable" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json deleted file mode 100644 index 536c98a6fb2b..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_client_config.json +++ /dev/null @@ -1,131 +0,0 @@ -{ - "interfaces": { - "google.bigtable.admin.v2.BigtableInstanceAdmin": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetCluster": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListAppProfiles": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListClusters": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListHotTablets": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "PartialUpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "PartialUpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateAppProfile": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateInstance": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php deleted file mode 100644 index c396dc6a8ab0..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_descriptor_config.php +++ /dev/null @@ -1,329 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateClusterMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '60000', - 'totalPollTimeoutMillis' => '21600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateInstanceMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'PartialUpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\PartialUpdateClusterMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'PartialUpdateInstance' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Instance', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateInstanceMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'instance.name', - 'fieldAccessors' => [ - 'getInstance', - 'getName', - ], - ], - ], - ], - 'UpdateAppProfile' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateAppProfileMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'app_profile.name', - 'fieldAccessors' => [ - 'getAppProfile', - 'getName', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Cluster', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateClusterMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAppProfile' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\AppProfile', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAppProfiles' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAppProfiles', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListAppProfilesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListHotTablets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getHotTablets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListHotTabletsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'appProfile' => 'projects/{project}/instances/{instance}/appProfiles/{app_profile}', - 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'instance' => 'projects/{project}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php deleted file mode 100644 index 16303777335e..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_instance_admin_rest_client_config.php +++ /dev/null @@ -1,318 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableInstanceAdmin' => [ - 'CreateAppProfile' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', - 'body' => 'app_profile', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'app_profile_id', - ], - ], - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateInstance' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/instances', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAppProfile' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'ignore_warnings', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteInstance' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAppProfile' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/appProfiles/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:getIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAppProfiles' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/appProfiles', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListHotTablets' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/hotTablets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartialUpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{cluster.name=projects/*/instances/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'PartialUpdateInstance' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{instance.name=projects/*/instances/*}', - 'body' => 'instance', - 'placeholders' => [ - 'instance.name' => [ - 'getters' => [ - 'getInstance', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:setIamPolicy', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*}:testIamPermissions', - 'body' => '*', - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateAppProfile' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{app_profile.name=projects/*/instances/*/appProfiles/*}', - 'body' => 'app_profile', - 'placeholders' => [ - 'app_profile.name' => [ - 'getters' => [ - 'getAppProfile', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateCluster' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateInstance' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=operations/**}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json deleted file mode 100644 index 3f976071db34..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_client_config.json +++ /dev/null @@ -1,151 +0,0 @@ -{ - "interfaces": { - "google.bigtable.admin.v2.BigtableTableAdmin": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CheckConsistency": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CopyBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateTableFromSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DropRowRange": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateConsistencyToken": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetSnapshot": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "GetTable": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListSnapshots": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ListTables": { - "timeout_millis": 60000, - "retry_codes_name": "idempotent", - "retry_params_name": "default" - }, - "ModifyColumnFamilies": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestoreTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SetIamPolicy": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SnapshotTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "TestIamPermissions": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UndeleteTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateBackup": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateTable": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php deleted file mode 100644 index 16ebe75c26fc..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_descriptor_config.php +++ /dev/null @@ -1,391 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableTableAdmin' => [ - 'CopyBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CopyBackupMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackup' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Backup', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateBackupMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTableFromSnapshot' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\CreateTableFromSnapshotMetadata', - 'initialPollDelayMillis' => '5000', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '60000', - 'totalPollTimeoutMillis' => '3600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RestoreTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\RestoreTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SnapshotTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Snapshot', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\SnapshotTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '600000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UndeleteTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UndeleteTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateTable' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Bigtable\Admin\V2\Table', - 'metadataReturnType' => '\Google\Cloud\Bigtable\Admin\V2\UpdateTableMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'table.name', - 'fieldAccessors' => [ - 'getTable', - 'getName', - ], - ], - ], - ], - 'CheckConsistency' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\CheckConsistencyResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DropRowRange' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConsistencyToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\GenerateConsistencyTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Snapshot', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetTable' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackups' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBackups', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSnapshots', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListSnapshotsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListTables' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTables', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\ListTablesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ModifyColumnFamilies' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Table', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\Policy', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Iam\V1\TestIamPermissionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'resource', - 'fieldAccessors' => [ - 'getResource', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\Admin\V2\Backup', - 'headerParams' => [ - [ - 'keyName' => 'backup.name', - 'fieldAccessors' => [ - 'getBackup', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}', - 'cluster' => 'projects/{project}/instances/{instance}/clusters/{cluster}', - 'cryptoKeyVersion' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}', - 'instance' => 'projects/{project}/instances/{instance}', - 'snapshot' => 'projects/{project}/instances/{instance}/clusters/{cluster}/snapshots/{snapshot}', - 'table' => 'projects/{project}/instances/{instance}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php b/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php deleted file mode 100644 index 2414ff1b10c7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/src/V2/resources/bigtable_table_admin_rest_client_config.php +++ /dev/null @@ -1,378 +0,0 @@ - [ - 'google.bigtable.admin.v2.BigtableTableAdmin' => [ - 'CheckConsistency' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:checkConsistency', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CopyBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups:copy', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackup' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', - 'body' => 'backup', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'backup_id', - ], - ], - 'CreateTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateTableFromSnapshot' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:createFromSnapshot', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSnapshot' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteTable' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DropRowRange' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:dropRowRange', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateConsistencyToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:generateConsistencyToken', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:getIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:getIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'GetSnapshot' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/clusters/*/snapshots/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetTable' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSnapshots' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*/clusters/*}/snapshots', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListTables' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ModifyColumnFamilies' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:modifyColumnFamilies', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/instances/*}/tables:restore', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SetIamPolicy' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:setIamPolicy', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:setIamPolicy', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'SnapshotTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:snapshot', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'TestIamPermissions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/tables/*}:testIamPermissions', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{resource=projects/*/instances/*/clusters/*/backups/*}:testIamPermissions', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'resource' => [ - 'getters' => [ - 'getResource', - ], - ], - ], - ], - 'UndeleteTable' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*/tables/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackup' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{backup.name=projects/*/instances/*/clusters/*/backups/*}', - 'body' => 'backup', - 'placeholders' => [ - 'backup.name' => [ - 'getters' => [ - 'getBackup', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateTable' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{table.name=projects/*/instances/*/tables/*}', - 'body' => 'table', - 'placeholders' => [ - 'table.name' => [ - 'getters' => [ - 'getTable', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=operations/**}:cancel', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=operations/projects/**}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableInstanceAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableInstanceAdminClientTest.php deleted file mode 100644 index 8ffc9f5511fe..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableInstanceAdminClientTest.php +++ /dev/null @@ -1,1892 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableInstanceAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableInstanceAdminClient($options); - } - - /** @test */ - public function createAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $response = $gapicClient->createAppProfile($formattedParent, $appProfileId, $appProfile); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppProfileId(); - $this->assertProtobufEquals($appProfileId, $actualValue); - $actualValue = $actualRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAppProfileExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - try { - $gapicClient->createAppProfile($formattedParent, $appProfileId, $appProfile); - // 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 createClusterTest() - { - $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/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); - $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.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $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 createClusterExceptionTest() - { - $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/createClusterTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $response = $gapicClient->createCluster($formattedParent, $clusterId, $cluster); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - 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 createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance, $clusters); - $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.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getClusters(); - $this->assertProtobufEquals($clusters, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $response = $gapicClient->createInstance($formattedParent, $instanceId, $instance, $clusters); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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 deleteAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - $gapicClient->deleteAppProfile($formattedName, $ignoreWarnings); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIgnoreWarnings(); - $this->assertProtobufEquals($ignoreWarnings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAppProfileExceptionTest() - { - $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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - try { - $gapicClient->deleteAppProfile($formattedName, $ignoreWarnings); - // 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 deleteClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $gapicClient->deleteCluster($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - try { - $gapicClient->deleteCluster($formattedName); - // 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 deleteInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $gapicClient->deleteInstance($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->deleteInstance($formattedName); - // 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 getAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $response = $gapicClient->getAppProfile($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppProfileExceptionTest() - { - $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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - try { - $gapicClient->getAppProfile($formattedName); - // 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 getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $response = $gapicClient->getCluster($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - try { - $gapicClient->getCluster($formattedName); - // 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // 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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $response = $gapicClient->getInstance($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->getInstance($formattedName); - // 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 listAppProfilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appProfilesElement = new AppProfile(); - $appProfiles = [ - $appProfilesElement, - ]; - $expectedResponse = new ListAppProfilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppProfiles($appProfiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $response = $gapicClient->listAppProfiles($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppProfiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppProfilesExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->listAppProfiles($formattedParent); - // 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 listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $response = $gapicClient->listClusters($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->listClusters($formattedParent); - // 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 listHotTabletsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hotTabletsElement = new HotTablet(); - $hotTablets = [ - $hotTabletsElement, - ]; - $expectedResponse = new ListHotTabletsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHotTablets($hotTablets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $response = $gapicClient->listHotTablets($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHotTablets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHotTabletsExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - try { - $gapicClient->listHotTablets($formattedParent); - // 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 listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $response = $gapicClient->listInstances($formattedParent); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $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]'); - try { - $gapicClient->listInstances($formattedParent); - // 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 partialUpdateClusterTest() - { - $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/partialUpdateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $response = $gapicClient->partialUpdateCluster($cluster, $updateMask); - $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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - $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 partialUpdateClusterExceptionTest() - { - $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/partialUpdateClusterTest'); - $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 - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $response = $gapicClient->partialUpdateCluster($cluster, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - 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 partialUpdateInstanceTest() - { - $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/partialUpdateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $response = $gapicClient->partialUpdateInstance($instance, $updateMask); - $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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - $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 partialUpdateInstanceExceptionTest() - { - $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/partialUpdateInstanceTest'); - $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 - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $response = $gapicClient->partialUpdateInstance($instance, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // 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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // 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 updateAppProfileTest() - { - $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/updateAppProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAppProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAppProfile($appProfile, $updateMask); - $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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - $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 updateAppProfileExceptionTest() - { - $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/updateAppProfileTest'); - $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 - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateAppProfile($appProfile, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - 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 updateClusterTest() - { - $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/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $location2 = 'location21541837352'; - $serveNodes2 = 1623486220; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location2); - $expectedResponse->setServeNodes($serveNodes2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $serveNodes = 1288838783; - $response = $gapicClient->updateCluster($name, $serveNodes); - $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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getServeNodes(); - $this->assertProtobufEquals($serveNodes, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $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 updateClusterExceptionTest() - { - $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/updateClusterTest'); - $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 - $name = 'name3373707'; - $serveNodes = 1288838783; - $response = $gapicClient->updateCluster($name, $serveNodes); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - 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 updateInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName2 = 'displayName21615000987'; - $satisfiesPzs2 = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName2); - $expectedResponse->setSatisfiesPzs($satisfiesPzs2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - $response = $gapicClient->updateInstance($name, $displayName, $type, $labels); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getDisplayName(); - $this->assertProtobufEquals($displayName, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $actualValue = $actualRequestObject->getLabels(); - $this->assertProtobufEquals($labels, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $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'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - try { - $gapicClient->updateInstance($name, $displayName, $type, $labels); - // 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()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableTableAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableTableAdminClientTest.php deleted file mode 100644 index bdfff9730ff7..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/BigtableTableAdminClientTest.php +++ /dev/null @@ -1,2138 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableTableAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableTableAdminClient($options); - } - - /** @test */ - public function checkConsistencyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistent = true; - $expectedResponse = new CheckConsistencyResponse(); - $expectedResponse->setConsistent($consistent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $response = $gapicClient->checkConsistency($formattedName, $consistencyToken); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConsistencyToken(); - $this->assertProtobufEquals($consistencyToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkConsistencyExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - try { - $gapicClient->checkConsistency($formattedName, $consistencyToken); - // 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 copyBackupTest() - { - $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/copyBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup2 = 'sourceBackup2889376921'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup2); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $response = $gapicClient->copyBackup($formattedParent, $backupId, $formattedSourceBackup, $expireTime); - $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.bigtable.admin.v2.BigtableTableAdmin/CopyBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceBackup(); - $this->assertProtobufEquals($formattedSourceBackup, $actualValue); - $actualValue = $actualApiRequestObject->getExpireTime(); - $this->assertProtobufEquals($expireTime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - $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 copyBackupExceptionTest() - { - $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/copyBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $response = $gapicClient->copyBackup($formattedParent, $backupId, $formattedSourceBackup, $expireTime); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - 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 createBackupTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $response = $gapicClient->createBackup($formattedParent, $backupId, $backup); - $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.bigtable.admin.v2.BigtableTableAdmin/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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 createBackupExceptionTest() - { - $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/createBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $response = $gapicClient->createBackup($formattedParent, $backupId, $backup); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - 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 createTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - $response = $gapicClient->createTable($formattedParent, $tableId, $table); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTableExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - try { - $gapicClient->createTable($formattedParent, $tableId, $table); - // 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 createTableFromSnapshotTest() - { - $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/createTableFromSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTableFromSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $response = $gapicClient->createTableFromSnapshot($formattedParent, $tableId, $formattedSourceSnapshot); - $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.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceSnapshot(); - $this->assertProtobufEquals($formattedSourceSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - $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 createTableFromSnapshotExceptionTest() - { - $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/createTableFromSnapshotTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $response = $gapicClient->createTableFromSnapshot($formattedParent, $tableId, $formattedSourceSnapshot); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - 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 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]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $gapicClient->deleteBackup($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/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]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - try { - $gapicClient->deleteBackup($formattedName); - // 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 deleteSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $gapicClient->deleteSnapshot($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotExceptionTest() - { - $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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - try { - $gapicClient->deleteSnapshot($formattedName); - // 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 deleteTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $gapicClient->deleteTable($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTableExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - try { - $gapicClient->deleteTable($formattedName); - // 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 dropRowRangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $gapicClient->dropRowRange($formattedName); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function dropRowRangeExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - try { - $gapicClient->dropRowRange($formattedName); - // 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 generateConsistencyTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistencyToken = 'consistencyToken-1090516718'; - $expectedResponse = new GenerateConsistencyTokenResponse(); - $expectedResponse->setConsistencyToken($consistencyToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $response = $gapicClient->generateConsistencyToken($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConsistencyTokenExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - try { - $gapicClient->generateConsistencyToken($formattedName); - // 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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $response = $gapicClient->getBackup($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/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]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - try { - $gapicClient->getBackup($formattedName); - // 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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $response = $gapicClient->getIamPolicy($resource); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - try { - $gapicClient->getIamPolicy($resource); - // 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 getSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description = 'description-1724546052'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $response = $gapicClient->getSnapshot($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotExceptionTest() - { - $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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - try { - $gapicClient->getSnapshot($formattedName); - // 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 getTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $response = $gapicClient->getTable($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTableExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - try { - $gapicClient->getTable($formattedName); - // 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 - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $response = $gapicClient->listBackups($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - try { - $gapicClient->listBackups($formattedParent); - // 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 listSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snapshotsElement = new Snapshot(); - $snapshots = [ - $snapshotsElement, - ]; - $expectedResponse = new ListSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnapshots($snapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $response = $gapicClient->listSnapshots($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - try { - $gapicClient->listSnapshots($formattedParent); - // 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 listTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tablesElement = new Table(); - $tables = [ - $tablesElement, - ]; - $expectedResponse = new ListTablesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTables($tables); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $response = $gapicClient->listTables($formattedParent); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTables()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListTables', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTablesExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->listTables($formattedParent); - // 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 modifyColumnFamiliesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - $response = $gapicClient->modifyColumnFamilies($formattedName, $modifications); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getModifications(); - $this->assertProtobufEquals($modifications, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyColumnFamiliesExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - try { - $gapicClient->modifyColumnFamilies($formattedName, $modifications); - // 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 restoreTableTest() - { - $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/restoreTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $response = $gapicClient->restoreTable($formattedParent, $tableId); - $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.bigtable.admin.v2.BigtableTableAdmin/RestoreTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - $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 restoreTableExceptionTest() - { - $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/restoreTableTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $response = $gapicClient->restoreTable($formattedParent, $tableId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $response = $gapicClient->setIamPolicy($resource, $policy); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - try { - $gapicClient->setIamPolicy($resource, $policy); - // 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 snapshotTableTest() - { - $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/snapshotTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description2 = 'description2568623279'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/snapshotTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $response = $gapicClient->snapshotTable($formattedName, $formattedCluster, $snapshotId); - $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.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($formattedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - $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 snapshotTableExceptionTest() - { - $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/snapshotTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $response = $gapicClient->snapshotTable($formattedName, $formattedCluster, $snapshotId); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - 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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $response = $gapicClient->testIamPermissions($resource, $permissions); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - try { - $gapicClient->testIamPermissions($resource, $permissions); - // 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 undeleteTableTest() - { - $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/undeleteTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeleteTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $response = $gapicClient->undeleteTable($formattedName); - $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.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - $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 undeleteTableExceptionTest() - { - $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/undeleteTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $response = $gapicClient->undeleteTable($formattedName); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - 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 updateBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $response = $gapicClient->updateBackup($backup, $updateMask); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupExceptionTest() - { - $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 - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - try { - $gapicClient->updateBackup($backup, $updateMask); - // 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 updateTableTest() - { - $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/updateTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $table = new Table(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateTable($table, $updateMask); - $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.bigtable.admin.v2.BigtableTableAdmin/UpdateTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - $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 updateTableExceptionTest() - { - $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/updateTableTest'); - $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 - $table = new Table(); - $updateMask = new FieldMask(); - $response = $gapicClient->updateTable($table, $updateMask); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - 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()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php deleted file mode 100644 index a7f1ed416932..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableInstanceAdminClientTest.php +++ /dev/null @@ -1,2070 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableInstanceAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableInstanceAdminClient($options); - } - - /** @test */ - public function createAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - $response = $gapicClient->createAppProfile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppProfileId(); - $this->assertProtobufEquals($appProfileId, $actualValue); - $actualValue = $actualRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAppProfileExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - try { - $gapicClient->createAppProfile($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 createClusterTest() - { - $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/createClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getClusterId(); - $this->assertProtobufEquals($clusterId, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - $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 createClusterExceptionTest() - { - $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/createClusterTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createClusterTest'); - 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 createInstanceTest() - { - $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/createInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - $response = $gapicClient->createInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceId(); - $this->assertProtobufEquals($instanceId, $actualValue); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getClusters(); - $this->assertProtobufEquals($clusters, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - $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 createInstanceExceptionTest() - { - $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/createInstanceTest'); - $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]'); - $instanceId = 'instanceId-2101995259'; - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $clustersValue = new Cluster(); - $valueName = 'valueName-765894756'; - $clustersValue->setName($valueName); - $valueServeNodes = 370436813; - $clustersValue->setServeNodes($valueServeNodes); - $clusters = [ - 'clustersKey' => $clustersValue, - ]; - $request = (new CreateInstanceRequest()) - ->setParent($formattedParent) - ->setInstanceId($instanceId) - ->setInstance($instance) - ->setClusters($clusters); - $response = $gapicClient->createInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createInstanceTest'); - 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 deleteAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - $request = (new DeleteAppProfileRequest()) - ->setName($formattedName) - ->setIgnoreWarnings($ignoreWarnings); - $gapicClient->deleteAppProfile($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getIgnoreWarnings(); - $this->assertProtobufEquals($ignoreWarnings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAppProfileExceptionTest() - { - $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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $ignoreWarnings = true; - $request = (new DeleteAppProfileRequest()) - ->setName($formattedName) - ->setIgnoreWarnings($ignoreWarnings); - try { - $gapicClient->deleteAppProfile($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 deleteClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $gapicClient->deleteCluster($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteClusterExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCluster($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 deleteInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - $gapicClient->deleteInstance($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/DeleteInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new DeleteInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteInstance($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 getAppProfileTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name2); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $request = (new GetAppProfileRequest()) - ->setName($formattedName); - $response = $gapicClient->getAppProfile($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAppProfileExceptionTest() - { - $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->appProfileName('[PROJECT]', '[INSTANCE]', '[APP_PROFILE]'); - $request = (new GetAppProfileRequest()) - ->setName($formattedName); - try { - $gapicClient->getAppProfile($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 getClusterTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->getCluster($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetCluster', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getClusterExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new GetClusterRequest()) - ->setName($formattedName); - try { - $gapicClient->getCluster($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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($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 getInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - $response = $gapicClient->getInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/GetInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getInstanceExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new GetInstanceRequest()) - ->setName($formattedName); - try { - $gapicClient->getInstance($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 listAppProfilesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $appProfilesElement = new AppProfile(); - $appProfiles = [ - $appProfilesElement, - ]; - $expectedResponse = new ListAppProfilesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAppProfiles($appProfiles); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListAppProfilesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAppProfiles($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAppProfiles()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListAppProfiles', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAppProfilesExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListAppProfilesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAppProfiles($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 listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListClusters', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listClustersExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listClusters($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 listHotTabletsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $hotTabletsElement = new HotTablet(); - $hotTablets = [ - $hotTabletsElement, - ]; - $expectedResponse = new ListHotTabletsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setHotTablets($hotTablets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListHotTabletsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listHotTablets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getHotTablets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListHotTablets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listHotTabletsExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListHotTabletsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listHotTablets($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 listInstancesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = 'nextPageToken-1530815211'; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/ListInstances', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listInstancesExceptionTest() - { - $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 ListInstancesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listInstances($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 partialUpdateClusterTest() - { - $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/partialUpdateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $location = 'location1901043637'; - $serveNodes = 1288838783; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setLocation($location); - $expectedResponse->setServeNodes($serveNodes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $request = (new PartialUpdateClusterRequest()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - $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 partialUpdateClusterExceptionTest() - { - $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/partialUpdateClusterTest'); - $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 - $cluster = new Cluster(); - $clusterName = 'clusterName-1141738587'; - $cluster->setName($clusterName); - $clusterServeNodes = 1434304124; - $cluster->setServeNodes($clusterServeNodes); - $updateMask = new FieldMask(); - $request = (new PartialUpdateClusterRequest()) - ->setCluster($cluster) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateClusterTest'); - 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 partialUpdateInstanceTest() - { - $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/partialUpdateInstanceTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $satisfiesPzs = false; - $expectedResponse = new Instance(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/partialUpdateInstanceTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $request = (new PartialUpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateInstance($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.bigtable.admin.v2.BigtableInstanceAdmin/PartialUpdateInstance', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getInstance(); - $this->assertProtobufEquals($instance, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - $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 partialUpdateInstanceExceptionTest() - { - $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/partialUpdateInstanceTest'); - $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 - $instance = new Instance(); - $instanceName = 'instanceName-737857344'; - $instance->setName($instanceName); - $instanceDisplayName = 'instanceDisplayName1824500376'; - $instance->setDisplayName($instanceDisplayName); - $instanceType = Type::TYPE_UNSPECIFIED; - $instance->setType($instanceType); - $labelsValue = 'labelsValue950036658'; - $instanceLabels = [ - 'labelsKey' => $labelsValue, - ]; - $instance->setLabels($instanceLabels); - $updateMask = new FieldMask(); - $request = (new PartialUpdateInstanceRequest()) - ->setInstance($instance) - ->setUpdateMask($updateMask); - $response = $gapicClient->partialUpdateInstance($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/partialUpdateInstanceTest'); - 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($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 updateAppProfileTest() - { - $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/updateAppProfileTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAppProfileTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $request = (new UpdateAppProfileRequest()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAppProfile($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateAppProfile', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - $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 updateAppProfileExceptionTest() - { - $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/updateAppProfileTest'); - $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 - $appProfile = new AppProfile(); - $updateMask = new FieldMask(); - $request = (new UpdateAppProfileRequest()) - ->setAppProfile($appProfile) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateAppProfile($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAppProfileTest'); - 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 updateClusterTest() - { - $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/updateClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $location2 = 'location21541837352'; - $serveNodes2 = 1623486220; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setLocation($location2); - $expectedResponse->setServeNodes($serveNodes2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $serveNodes = 1288838783; - $request = (new Cluster()) - ->setName($name) - ->setServeNodes($serveNodes); - $response = $gapicClient->updateCluster($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.bigtable.admin.v2.BigtableInstanceAdmin/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getServeNodes(); - $this->assertProtobufEquals($serveNodes, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - $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 updateClusterExceptionTest() - { - $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/updateClusterTest'); - $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 - $name = 'name3373707'; - $serveNodes = 1288838783; - $request = (new Cluster()) - ->setName($name) - ->setServeNodes($serveNodes); - $response = $gapicClient->updateCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateClusterTest'); - 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 updateInstanceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName2 = 'displayName21615000987'; - $satisfiesPzs2 = true; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName2); - $expectedResponse->setSatisfiesPzs($satisfiesPzs2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - $request = (new Instance()) - ->setName($name) - ->setDisplayName($displayName) - ->setType($type) - ->setLabels($labels); - $response = $gapicClient->updateInstance($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableInstanceAdmin/UpdateInstance', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getDisplayName(); - $this->assertProtobufEquals($displayName, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $actualValue = $actualRequestObject->getLabels(); - $this->assertProtobufEquals($labels, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateInstanceExceptionTest() - { - $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'; - $displayName = 'displayName1615086568'; - $type = Type::TYPE_UNSPECIFIED; - $labelsValue = 'labelsValue950036658'; - $labels = [ - 'labelsKey' => $labelsValue, - ]; - $request = (new Instance()) - ->setName($name) - ->setDisplayName($displayName) - ->setType($type) - ->setLabels($labels); - try { - $gapicClient->updateInstance($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 createAppProfileAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $etag = 'etag3123477'; - $description = 'description-1724546052'; - $expectedResponse = new AppProfile(); - $expectedResponse->setName($name); - $expectedResponse->setEtag($etag); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $appProfileId = 'appProfileId1262094415'; - $appProfile = new AppProfile(); - $request = (new CreateAppProfileRequest()) - ->setParent($formattedParent) - ->setAppProfileId($appProfileId) - ->setAppProfile($appProfile); - $response = $gapicClient->createAppProfileAsync($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.bigtable.admin.v2.BigtableInstanceAdmin/CreateAppProfile', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAppProfileId(); - $this->assertProtobufEquals($appProfileId, $actualValue); - $actualValue = $actualRequestObject->getAppProfile(); - $this->assertProtobufEquals($appProfile, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php b/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php deleted file mode 100644 index ea1e34fcb394..000000000000 --- a/owl-bot-staging/Bigtable/v2/Admin/tests/Unit/V2/Client/BigtableTableAdminClientTest.php +++ /dev/null @@ -1,2332 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableTableAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableTableAdminClient($options); - } - - /** @test */ - public function checkConsistencyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistent = true; - $expectedResponse = new CheckConsistencyResponse(); - $expectedResponse->setConsistent($consistent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - $response = $gapicClient->checkConsistency($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConsistencyToken(); - $this->assertProtobufEquals($consistencyToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkConsistencyExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - try { - $gapicClient->checkConsistency($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 copyBackupTest() - { - $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/copyBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup2 = 'sourceBackup2889376921'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup2); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $request = (new CopyBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setSourceBackup($formattedSourceBackup) - ->setExpireTime($expireTime); - $response = $gapicClient->copyBackup($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.bigtable.admin.v2.BigtableTableAdmin/CopyBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceBackup(); - $this->assertProtobufEquals($formattedSourceBackup, $actualValue); - $actualValue = $actualApiRequestObject->getExpireTime(); - $this->assertProtobufEquals($expireTime, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - $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 copyBackupExceptionTest() - { - $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/copyBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $formattedSourceBackup = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[BACKUP]'); - $expireTime = new Timestamp(); - $request = (new CopyBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setSourceBackup($formattedSourceBackup) - ->setExpireTime($expireTime); - $response = $gapicClient->copyBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyBackupTest'); - 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 createBackupTest() - { - $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/createBackupTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBackupTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($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.bigtable.admin.v2.BigtableTableAdmin/CreateBackup', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBackupId(); - $this->assertProtobufEquals($backupId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - $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 createBackupExceptionTest() - { - $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/createBackupTest'); - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $backupId = 'backupId1355353272'; - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $request = (new CreateBackupRequest()) - ->setParent($formattedParent) - ->setBackupId($backupId) - ->setBackup($backup); - $response = $gapicClient->createBackup($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBackupTest'); - 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 createTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - $request = (new CreateTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setTable($table); - $response = $gapicClient->createTable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/CreateTable', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createTableExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $table = new Table(); - $request = (new CreateTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setTable($table); - try { - $gapicClient->createTable($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 createTableFromSnapshotTest() - { - $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/createTableFromSnapshotTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createTableFromSnapshotTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new CreateTableFromSnapshotRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setSourceSnapshot($formattedSourceSnapshot); - $response = $gapicClient->createTableFromSnapshot($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.bigtable.admin.v2.BigtableTableAdmin/CreateTableFromSnapshot', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $actualValue = $actualApiRequestObject->getSourceSnapshot(); - $this->assertProtobufEquals($formattedSourceSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - $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 createTableFromSnapshotExceptionTest() - { - $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/createTableFromSnapshotTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $formattedSourceSnapshot = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new CreateTableFromSnapshotRequest()) - ->setParent($formattedParent) - ->setTableId($tableId) - ->setSourceSnapshot($formattedSourceSnapshot); - $response = $gapicClient->createTableFromSnapshot($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createTableFromSnapshotTest'); - 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 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]', '[INSTANCE]', '[CLUSTER]', '[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.bigtable.admin.v2.BigtableTableAdmin/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]', '[INSTANCE]', '[CLUSTER]', '[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 deleteSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - $gapicClient->deleteSnapshot($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSnapshotExceptionTest() - { - $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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new DeleteSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSnapshot($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 deleteTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DeleteTableRequest()) - ->setName($formattedName); - $gapicClient->deleteTable($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DeleteTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteTableExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DeleteTableRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteTable($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 dropRowRangeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DropRowRangeRequest()) - ->setName($formattedName); - $gapicClient->dropRowRange($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/DropRowRange', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function dropRowRangeExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new DropRowRangeRequest()) - ->setName($formattedName); - try { - $gapicClient->dropRowRange($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 generateConsistencyTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistencyToken = 'consistencyToken-1090516718'; - $expectedResponse = new GenerateConsistencyTokenResponse(); - $expectedResponse->setConsistencyToken($consistencyToken); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateConsistencyTokenRequest()) - ->setName($formattedName); - $response = $gapicClient->generateConsistencyToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GenerateConsistencyToken', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateConsistencyTokenExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateConsistencyTokenRequest()) - ->setName($formattedName); - try { - $gapicClient->generateConsistencyToken($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 getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[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.bigtable.admin.v2.BigtableTableAdmin/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]', '[INSTANCE]', '[CLUSTER]', '[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 getIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - $response = $gapicClient->getIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $request = (new GetIamPolicyRequest()) - ->setResource($resource); - try { - $gapicClient->getIamPolicy($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 getSnapshotTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description = 'description-1724546052'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - $response = $gapicClient->getSnapshot($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetSnapshot', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSnapshotExceptionTest() - { - $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->snapshotName('[PROJECT]', '[INSTANCE]', '[CLUSTER]', '[SNAPSHOT]'); - $request = (new GetSnapshotRequest()) - ->setName($formattedName); - try { - $gapicClient->getSnapshot($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 getTableTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GetTableRequest()) - ->setName($formattedName); - $response = $gapicClient->getTable($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/GetTable', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTableExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GetTableRequest()) - ->setName($formattedName); - try { - $gapicClient->getTable($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 - $nextPageToken = ''; - $backupsElement = new Backup(); - $backups = [ - $backupsElement, - ]; - $expectedResponse = new ListBackupsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBackups($backups); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBackups()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $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 listSnapshotsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $snapshotsElement = new Snapshot(); - $snapshots = [ - $snapshotsElement, - ]; - $expectedResponse = new ListSnapshotsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSnapshots($snapshots); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSnapshots($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSnapshots()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListSnapshots', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSnapshotsExceptionTest() - { - $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->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $request = (new ListSnapshotsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSnapshots($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 listTablesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tablesElement = new Table(); - $tables = [ - $tablesElement, - ]; - $expectedResponse = new ListTablesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTables($tables); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListTablesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listTables($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTables()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ListTables', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTablesExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new ListTablesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listTables($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 modifyColumnFamiliesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - $request = (new ModifyColumnFamiliesRequest()) - ->setName($formattedName) - ->setModifications($modifications); - $response = $gapicClient->modifyColumnFamilies($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/ModifyColumnFamilies', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getModifications(); - $this->assertProtobufEquals($modifications, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function modifyColumnFamiliesExceptionTest() - { - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $modifications = []; - $request = (new ModifyColumnFamiliesRequest()) - ->setName($formattedName) - ->setModifications($modifications); - try { - $gapicClient->modifyColumnFamilies($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 restoreTableTest() - { - $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/restoreTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $request = (new RestoreTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId); - $response = $gapicClient->restoreTable($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.bigtable.admin.v2.BigtableTableAdmin/RestoreTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getTableId(); - $this->assertProtobufEquals($tableId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - $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 restoreTableExceptionTest() - { - $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/restoreTableTest'); - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $tableId = 'tableId-895419604'; - $request = (new RestoreTableRequest()) - ->setParent($formattedParent) - ->setTableId($tableId); - $response = $gapicClient->restoreTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreTableTest'); - 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 setIamPolicyTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $version = 351608024; - $etag = '21'; - $expectedResponse = new Policy(); - $expectedResponse->setVersion($version); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - $response = $gapicClient->setIamPolicy($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/SetIamPolicy', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPolicy(); - $this->assertProtobufEquals($policy, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setIamPolicyExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $policy = new Policy(); - $request = (new SetIamPolicyRequest()) - ->setResource($resource) - ->setPolicy($policy); - try { - $gapicClient->setIamPolicy($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 snapshotTableTest() - { - $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/snapshotTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $dataSizeBytes = 2110122398; - $description2 = 'description2568623279'; - $expectedResponse = new Snapshot(); - $expectedResponse->setName($name2); - $expectedResponse->setDataSizeBytes($dataSizeBytes); - $expectedResponse->setDescription($description2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/snapshotTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new SnapshotTableRequest()) - ->setName($formattedName) - ->setCluster($formattedCluster) - ->setSnapshotId($snapshotId); - $response = $gapicClient->snapshotTable($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.bigtable.admin.v2.BigtableTableAdmin/SnapshotTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($formattedCluster, $actualValue); - $actualValue = $actualApiRequestObject->getSnapshotId(); - $this->assertProtobufEquals($snapshotId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - $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 snapshotTableExceptionTest() - { - $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/snapshotTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $formattedCluster = $gapicClient->clusterName('[PROJECT]', '[INSTANCE]', '[CLUSTER]'); - $snapshotId = 'snapshotId-168585866'; - $request = (new SnapshotTableRequest()) - ->setName($formattedName) - ->setCluster($formattedCluster) - ->setSnapshotId($snapshotId); - $response = $gapicClient->snapshotTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/snapshotTableTest'); - 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 testIamPermissionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TestIamPermissionsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - $response = $gapicClient->testIamPermissions($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/TestIamPermissions', $actualFuncCall); - $actualValue = $actualRequestObject->getResource(); - $this->assertProtobufEquals($resource, $actualValue); - $actualValue = $actualRequestObject->getPermissions(); - $this->assertProtobufEquals($permissions, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function testIamPermissionsExceptionTest() - { - $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 - $resource = 'resource-341064690'; - $permissions = []; - $request = (new TestIamPermissionsRequest()) - ->setResource($resource) - ->setPermissions($permissions); - try { - $gapicClient->testIamPermissions($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 undeleteTableTest() - { - $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/undeleteTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name2); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeleteTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new UndeleteTableRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteTable($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.bigtable.admin.v2.BigtableTableAdmin/UndeleteTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - $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 undeleteTableExceptionTest() - { - $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/undeleteTableTest'); - $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->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new UndeleteTableRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeleteTableTest'); - 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 updateBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $sourceTable = 'sourceTable1670858410'; - $sourceBackup = 'sourceBackup-258292122'; - $sizeBytes = 1796325715; - $expectedResponse = new Backup(); - $expectedResponse->setName($name); - $expectedResponse->setSourceTable($sourceTable); - $expectedResponse->setSourceBackup($sourceBackup); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.admin.v2.BigtableTableAdmin/UpdateBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getBackup(); - $this->assertProtobufEquals($backup, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupExceptionTest() - { - $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 - $backup = new Backup(); - $backupSourceTable = 'backupSourceTable1043210577'; - $backup->setSourceTable($backupSourceTable); - $backupExpireTime = new Timestamp(); - $backup->setExpireTime($backupExpireTime); - $updateMask = new FieldMask(); - $request = (new UpdateBackupRequest()) - ->setBackup($backup) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateBackup($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 updateTableTest() - { - $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/updateTableTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $deletionProtection = true; - $expectedResponse = new Table(); - $expectedResponse->setName($name); - $expectedResponse->setDeletionProtection($deletionProtection); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateTableTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $table = new Table(); - $updateMask = new FieldMask(); - $request = (new UpdateTableRequest()) - ->setTable($table) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTable($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.bigtable.admin.v2.BigtableTableAdmin/UpdateTable', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getTable(); - $this->assertProtobufEquals($table, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - $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 updateTableExceptionTest() - { - $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/updateTableTest'); - $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 - $table = new Table(); - $updateMask = new FieldMask(); - $request = (new UpdateTableRequest()) - ->setTable($table) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateTable($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateTableTest'); - 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 checkConsistencyAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $consistent = true; - $expectedResponse = new CheckConsistencyResponse(); - $expectedResponse->setConsistent($consistent); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $consistencyToken = 'consistencyToken-1090516718'; - $request = (new CheckConsistencyRequest()) - ->setName($formattedName) - ->setConsistencyToken($consistencyToken); - $response = $gapicClient->checkConsistencyAsync($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.bigtable.admin.v2.BigtableTableAdmin/CheckConsistency', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getConsistencyToken(); - $this->assertProtobufEquals($consistencyToken, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Bigtable.php deleted file mode 100644 index dbac4b1db5331ecd060e2f36b63a14a1e2339121..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9610 zcmc&4O>7)jIlF5+-e)^;Uead0P0M7O#7<(biwOx`H%Vu0$99|8TYKYBSZOq#eQOVy zo!QRJ#+b+#BoM091LD{lHxM8pB!oa5Dx@BIqz5D;Bo0-Pio^+V;DGqv-|Xz}*xpTR zHJ8lJ`@Zje|9_s>?$)>K=w)S*IK(poQc*T{m0+7Fb72&lf>@Jy0dwp@41CexeNR$y$x!;_itImf6Wi^akN z5*QUDFv^Pzv0M;{<&BwHgiPD;eMP=QPmu!u>Wxj?G8I2C0{HKeW7y?+;+vjT z4_vPZp!xh32||_8HxpOIwUnGyRVFx(`FsbHx0S$akm&7-;*p@?IkSv!N?et`x|&@x*ey-cZ+waF3ptTyqh>V5jAa6bVs76I^tkBOs9^oTo>IC)W=NET>{q8UgWUx_*PxJ&3X zoP7cJl7M4L4YI^^MHpV3OXkD#Kw9@80z1Nl;#{i5tDDpG;)b|c{b>rFUL!_j&E4^Z zv*J4lv3#r3zuE`|f*U(H>AVdL}sqVxT|hxhM~ zCe>f3=ta^kQ*tXrx7b!VpUQCCwz4{Xr6?o0ptMCna6#N5lB5XsBw`EPIzb7k7mVlB)FY z+2+mg%{^@QG7sz&19C?Sn(6 zz#&Ia{}XxzbBkf>M(n5VL-A)O?#E|Q8j=ACsCqJk)apwo@HuEE+#2{Adz>guqQ5~k$JLtK#`-Go#nBW{5cB@q?(2Uy>d-S}+JPLOV{8Ht!&1+p zGZDVI(CYsZk+;XFdzzloSVJeF1M)1UOv?6k>7N~JQ|(HAatna8%cRJzpnmoXcbKb1 zE6HxP@<{^WP%UtwaE9AWPI=atJc?71H#l>5(P`S!^F#}sa@7@i;bI(_H2}R&Q}QwZ zE}i&MB9YBYF(LFUr$WBV%1a8XXn>a`Q5>+O2L%g~0WDYsj7Igg+toMFNXsqwDjI;! z#d0f*@X*YdBow9=*;8T2235m^{+r#IP=A#~nYnFZKGvK{sJi2e1X@B4iiBHewC<6L zWm08}N=QrB(998)@CG_XX92wy#!=tV9)rJ*PO~{Df<_bM5#guaL}M}f5}r1O&NM}+ z8G*SCWs}x`LDfRI2-zLf{K)WXQp2;TFVb&Jv3{dGjxNg(ifuTS9dH|%y<&O}o)(`& zXIt(P`QgI^8lx5Ufm^YvyN^8UOH6ySsNZYYkUMzFE00T;m6Fq(*Ul^;@bp(e+4eJ< zzl9Ypp%g7#RPRGG=VJ-GJL(S;Xj1m$%Y6Ku+cumn0%e#OwW8q#FcU*ombUuhJ49}+ zEi~07A40yHC|#G_2`OKWld??^_5Bn&Pt_I`^O%LhExhu+wi{mYD+qy;dx1{78rI1~ zn&&XBmE=SK{mGl?tm!&1?>1O5)dTl2fs)EINNmRE`k9L$l^6~Xn?!@esqo8bAAjiO zkV^120cJOe5$JM?VZGF0xtR7&T*j*B*3_RNl4^q7#;GG7l9-zZGZngGl7) zJkKr9l$8!S7S-owPt=yAyg;mohE3b`33P!pazu6fMo;wSC;@Jer4!kIC(sD1Mi76z zasMWCpR|ML^_PeCd`~yD(91EZv_wOvJtzx@(8QtrSN3ga^(iL|Ig2o33r2}Z7fspg zr?W=u8E-(@CH=JTW|Ig5VJaKUewae2X(s#z>I-)3d>B17^IA{RHp%2lKm$W%;u|F0 zv>QImk90z1`6t?Z(EuHWmUL8f`r$}%bOcg?0*h>d2Rw$6g$7MONFc|x0ajY`J;~5w zF+7a=Dy~ELJVK`!7T_5=h@|l>IuDB<3ra3n!iJ%42cEo|;XTeE05~*!)gtO+Iy#3& zOK%q!+UC|l)c0_GVU16!i`rU2TU^lRR`1_mm@6%>u8byOMjoD9T`4WEJk;2mRQAUS zlnx^VFM^Xqk_^vGB8Fp|<^vMbVNz049x7$_cL_8UiLyxd$)hQz`@~D}Ih8l$J+gkv zAv=0lw`Ae(rWh1XqY<83bdQ*>SDE=s1`QU(o*TcPM1wTz(IErJ(vzp6*kvyr$xo7Z)K}?(>uGa4bQ|i=cZeDI)7Pdg(TmY%1_2Lyc?bf=PCjw%T}opG z=cDT-JlP91@UOPj(!LhiRqbnIP1Yt`cTle+@Gp{Rq-93N6LHeFfJi-E?E+FL>rY%+ zuj4yCE6a~=48Cl2eE^#rmUrmPienumJeF#@9H*uTlu*&9Tt#=)e9tPX$sNV9In;%S z4?*)xmtvFbR@wpYYu67uZgV>PndJ+i&dUO7~Y;WV#)EIdt}eReha$EHUd zQIuGZ>}wZ0U$*HC0`-?Ebf#mn#IcQQ2blE4sW=_RKnsujeUfFkMYYhgDq*s1-5DI4 zMhg+;NzZH!*?dnh**gDEwhi|C+FPHWNSnp*zo4E*rfeMRzYzdwqxey`1yGphJ?`n( z)hoDkNIVYeVn@G8E{*9!Q>r-vcM6&ALR*w@ZdympEImV_04$Nm7vI$bB6 zl>fk$efwHMXyG4R3rp%;&rV9qa4S`*qA$E4XJQX&jMYo0^C>LzsoO=@8#uN}ZHJONiA}bh zz(V{6OP=>st!L?}Uq-p?P0;LLlOJj4!#!E+UnBpl{V};61a&_@J-xHDBa9sWtTy}L;3{I~X)@>uGx?ZhI{v?JegT!AME5{ zC~H)5l5}ok<|BDjF0-?8^P3*{Fypi23mh?@XQ%nRM9t^nR4aD7JuZ)jbIeomv=^CY zp32c??=!7j?&@#gH@hS#CnY`w?QIS)jeTuA{2*eIf7}!K76=w)@U2qJcR&o1f3LHL H_7M6%d-Jl| diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/Data.php deleted file mode 100644 index eaa31e50f7461db573459e78d9e6951045bfa0a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3798 zcmb7HUvJY^6epxjJCjOo-cAf3zvQ(D-T1`67Ms#HaqB6*H;6RbMEo_$@` zO-Os*C)j70w8y>gY0~y3_P$TCbMLiXr*#AHQj>Ge@BBaaoXszS*8$wnw~0?en~}cW zJJQ)}q6Z;m)S;fJA+Ru1CVAu6JJO&tL56k2+8HuA^u~~0I8ZaWd`?wcC`j%P=a-a$J21Umi; z;-2R^dcxck&+B=l{s+aZw?x&fo%4zjjdL&CC9@n0G@6SW-99q0{dW2<$_$Ok$L zW0Kdd>mgxr=x+$SIl$ZOOIUX2p_|z8RllF9eT->nWQ<&F4gS0YS0~0_(rl)ym z8ec+rm%heZ9e8aN5&RZF9oUbkvqyn7a-EPy0;{ae!Stc+#RMJWuFgZnvwH-g%jl?L{8EA{#$(s^heWHxA|iy$ z!q8ZbMw*Rmoyz# zq$ybrQpZKS(7kJL;Uq`SO+n}OpOR0U)vkaxP8ZVCNhp?J;RJen0p`X8jOQ@FmnK)b zaxJy`jHF+I3moDUmHSjSek}p)^O}%gXrMGf)Jf{T=nQl}s|iUR%RJJ!nlZT(+0RL( z*`EV7r;isy24ehM1qBm`?T)iZ`wZLQwe9+%2vzgO8R?eX%`MJ~7C!_KBg7;2p)7mV zY)lpvqfhXo{3a+4_4_z$sgGS!!g0`Dn=HST@}u}XOhvALP+LUFD*pcxECe{(E!*>~ zf$*!gl#nofJ&!sEd775cuObM@5mzwH?ZLVCA?H#~`W#!YG0m zuXsekGL^+NW}}kWxS3J;fJjYT5ct=M@b|L@KAMc@ zQ)$@v2zi$gnh7f35mFgGq24KT7iPuwlM2Zuo$PJ93Kbb0By3a7O$de-kFHe5n_)~N;b-AFxkDy^m$(} zxs@Q;BUs2=h6P>YV?#ARc~7&jMzFAKm`S|V3g1p#I+E(n9=~MEC|XB&l5*>am}B)L zSUeew57l)KfKL~>86**VkBL&pHqGglu`ASF#|Qb?NDNIIpgKzG$N0Gf%e%zxKcjtj zaP%s48QG0JQi#OYv@;@xOBD8b_7Dm``0T|e!u6eyjEK)HdqiWOiCmVSoNHHLDnwOA z8x~%&kl3Rg+}*^prLBX4Sx;gj`*8BI^a^Sc16!K8ek__}j~);|(l(&N#FtpbRP$C* z6`dh%dDyMa(hsSJ zZ$y)Z!}THY#ih0`Np|2y`CD!yJsf^JU)vT(TXV~!ale_KZq0r3pOninternalAddGeneratedFile( - ' -‘ -&google/bigtable/v2/feature_flags.protogoogle.bigtable.v2"Š - FeatureFlags - reverse_scans ( -mutate_rows_rate_limit ( -mutate_rows_rate_limit2 (" -last_scanned_row_responses (B½ -com.google.bigtable.v2BFeatureFlagsProtoPZ:google.golang.org/genproto/googleapis/bigtable/v2;bigtableªGoogle.Cloud.Bigtable.V2ÊGoogle\\Cloud\\Bigtable\\V2êGoogle::Cloud::Bigtable::V2bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/GPBMetadata/Google/Bigtable/V2/RequestStats.php deleted file mode 100644 index c908fd6b931204a92aa67f5d9aee35fe051282a0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1347 zcma)6(QeZ)6r~&R;7x*cg$<1dQ^wXwkV@grV<1YmG6`52Qy);I$aS2|l4l3U=`_$@ z_!D0F2Y!J6;DxWic9J%*K9HA0xxVL~bA0c8_98t^!9zHpf-0nGQ3J zb>=xp00cgxS&9jTgJJJ2)i}Z$2LqQK^vdjDnbxosx52L)VC(a}C^5@;nPON<~OyF7$c>Had&V4Y2A0g>)K~!37sw2e%33 z{I9e{7r75wMdY8n>o(ec4_3>rd1IPdkc)x@0&B67#s?7@B5Fca$cwlmv*h3NN=2?$ z&Bc3_we4>WuyT-dZnZhI5u@kLK4>ZPBV?7@qSs5ftqQJYkT=Ji18}Drm6A^hV_jJC zgYEe^Zn)|K+XO7vr=__MTCw3AI*zszvv6W)m-HUZgT12h^|jtI0JG%Yj|RAF*1??Q z-b%f?YtLchBPu;jB*!B0q)NI870%&q5yC0U>WgEy^6UG;`oJv)?-iGM22+SH!JH!$N*bBS9O81d zLIsIj7d%H508D1^Wp)Z5CMT!QZK;-}N{~V(WtQV0=9yu!JzNY23Uwic#$~}2TkF7y z5+c~z0xUt8&cn}WSjr5Grmj8;oBC)m91)V_Ol$bs=**oA`9{EgMH%Nj0d1JEzkRNk zTyVo#&adn<#;{_!Mk}$)U6mp+TneZPW+FlV5NgeeyI)BA>@lQbo;Ar{KKYgCC69b*E3SOGvpYIDsj6zfI?F$F>-TP0-NsSCVTys zH*>s8)2{7D>y6(LtFi;~yGQ*0HKpILnL%q`a4~#wMjqbWeE%`Ib0q~XdAjF;=imEu z>$~UmpH@DV+HR);dJga`5E62C+3>>$dHSxpzhzY9@0g zvOubAkfCsq8q^RgxZcj+sC~?j-rm%uD|nyFG7Z{{1&iUY7K$Q=Mb`ne3H;N0Ru@w0 iP)gfUN*BZUw(EX$&@KK|?dO*L|FqsQYnL}google.bigtable.v2.Cell - */ -class Cell extends \Google\Protobuf\Internal\Message -{ - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - */ - protected $timestamp_micros = 0; - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - */ - protected $value = ''; - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $timestamp_micros - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * @type string $value - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The cell's stored timestamp, which also uniquely identifies it within - * its column. - * Values are always expressed in microseconds, but individual tables may set - * a coarser granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will only allow - * values of `timestamp_micros` which are multiples of 1000. - * - * Generated from protobuf field int64 timestamp_micros = 1; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value stored in the cell. - * May contain any byte string, including the empty string, up to 100MiB in - * length. - * - * Generated from protobuf field bytes value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to the cell by a [RowFilter][google.bigtable.v2.RowFilter]. - * - * Generated from protobuf field repeated string labels = 3; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php deleted file mode 100644 index 62d4abf2b829..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowRequest.php +++ /dev/null @@ -1,382 +0,0 @@ -google.bigtable.v2.CheckAndMutateRowRequest - */ -class CheckAndMutateRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - */ - protected $predicate_filter = null; - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - */ - private $true_mutations; - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - */ - private $false_mutations; - - /** - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the conditional mutation should be - * applied. - * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setPredicateFilter($predicateFilter) - ->setTrueMutations($trueMutations) - ->setFalseMutations($falseMutations); - } - - /** - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the conditional mutation should be - * applied. - * @param \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $trueMutations Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $falseMutations Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\CheckAndMutateRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyPredicateFilterTrueMutationsFalseMutationsAppProfileId(string $tableName, string $rowKey, \Google\Cloud\Bigtable\V2\RowFilter $predicateFilter, array $trueMutations, array $falseMutations, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setPredicateFilter($predicateFilter) - ->setTrueMutations($trueMutations) - ->setFalseMutations($falseMutations) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the conditional mutation should be - * applied. - * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $true_mutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $false_mutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 7; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the conditional mutation should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getPredicateFilter() - { - return $this->predicate_filter; - } - - public function hasPredicateFilter() - { - return isset($this->predicate_filter); - } - - public function clearPredicateFilter() - { - unset($this->predicate_filter); - } - - /** - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 6; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setPredicateFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->predicate_filter = $var; - - return $this; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTrueMutations() - { - return $this->true_mutations; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation true_mutations = 4; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTrueMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->true_mutations = $arr; - - return $this; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFalseMutations() - { - return $this->false_mutations; - } - - /** - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation false_mutations = 5; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFalseMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->false_mutations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php deleted file mode 100644 index ea562f574e70..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/CheckAndMutateRowResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.bigtable.v2.CheckAndMutateRowResponse - */ -class CheckAndMutateRowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - */ - protected $predicate_matched = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $predicate_matched - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - * @return bool - */ - public function getPredicateMatched() - { - return $this->predicate_matched; - } - - /** - * Whether or not the request's `predicate_filter` yielded any results for - * the specified row. - * - * Generated from protobuf field bool predicate_matched = 1; - * @param bool $var - * @return $this - */ - public function setPredicateMatched($var) - { - GPBUtil::checkBool($var); - $this->predicate_matched = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php deleted file mode 100644 index b2f46bdf290b..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Column.php +++ /dev/null @@ -1,118 +0,0 @@ -google.bigtable.v2.Column - */ -class Column extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - */ - protected $qualifier = ''; - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - */ - private $cells; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $qualifier - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * @type array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $cells - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - * @return string - */ - public function getQualifier() - { - return $this->qualifier; - } - - /** - * The unique key which identifies this column within its family. This is the - * same key that's used to identify the column in, for example, a RowFilter - * which sets its `column_qualifier_regex_filter` field. - * May contain any byte string, including the empty string, up to 16kiB in - * length. - * - * Generated from protobuf field bytes qualifier = 1; - * @param string $var - * @return $this - */ - public function setQualifier($var) - { - GPBUtil::checkString($var, False); - $this->qualifier = $var; - - return $this; - } - - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCells() - { - return $this->cells; - } - - /** - * Must not be empty. Sorted in order of decreasing "timestamp_micros". - * - * Generated from protobuf field repeated .google.bigtable.v2.Cell cells = 2; - * @param array<\Google\Cloud\Bigtable\V2\Cell>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCells($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Cell::class); - $this->cells = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php deleted file mode 100644 index d5ff522b00d6..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ColumnRange.php +++ /dev/null @@ -1,220 +0,0 @@ -google.bigtable.v2.ColumnRange - */ -class ColumnRange extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - protected $start_qualifier; - protected $end_qualifier; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the column family within which this range falls. - * @type string $start_qualifier_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_qualifier_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_qualifier_closed - * Used when giving an inclusive upper bound for the range. - * @type string $end_qualifier_open - * Used when giving an exclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the column family within which this range falls. - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_closed = 2; - * @return string - */ - public function getStartQualifierClosed() - { - return $this->readOneof(2); - } - - public function hasStartQualifierClosed() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_closed = 2; - * @param string $var - * @return $this - */ - public function setStartQualifierClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_open = 3; - * @return string - */ - public function getStartQualifierOpen() - { - return $this->readOneof(3); - } - - public function hasStartQualifierOpen() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_qualifier_open = 3; - * @param string $var - * @return $this - */ - public function setStartQualifierOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_closed = 4; - * @return string - */ - public function getEndQualifierClosed() - { - return $this->readOneof(4); - } - - public function hasEndQualifierClosed() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_closed = 4; - * @param string $var - * @return $this - */ - public function setEndQualifierClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_open = 5; - * @return string - */ - public function getEndQualifierOpen() - { - return $this->readOneof(5); - } - - public function hasEndQualifierOpen() - { - return $this->hasOneof(5); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_qualifier_open = 5; - * @param string $var - * @return $this - */ - public function setEndQualifierOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartQualifier() - { - return $this->whichOneof("start_qualifier"); - } - - /** - * @return string - */ - public function getEndQualifier() - { - return $this->whichOneof("end_qualifier"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php deleted file mode 100644 index 429023c4587d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Family.php +++ /dev/null @@ -1,122 +0,0 @@ -google.bigtable.v2.Family - */ -class Family extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - */ - private $columns; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * @type array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $columns - * Must not be empty. Sorted in order of increasing "qualifier". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The unique key which identifies this family within its row. This is the - * same key that's used to identify the family in, for example, a RowFilter - * which sets its "family_name_regex_filter" field. - * Must match `[-_.a-zA-Z0-9]+`, except that AggregatingRowProcessors may - * produce cells in a sentinel family with an empty name. - * Must be no greater than 64 characters in length. - * - * 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; - } - - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumns() - { - return $this->columns; - } - - /** - * Must not be empty. Sorted in order of increasing "qualifier". - * - * Generated from protobuf field repeated .google.bigtable.v2.Column columns = 2; - * @param array<\Google\Cloud\Bigtable\V2\Column>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumns($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Column::class); - $this->columns = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php deleted file mode 100644 index 00b311eb2481..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FeatureFlags.php +++ /dev/null @@ -1,200 +0,0 @@ -google.bigtable.v2.FeatureFlags - */ -class FeatureFlags extends \Google\Protobuf\Internal\Message -{ - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - */ - protected $reverse_scans = false; - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - */ - protected $mutate_rows_rate_limit = false; - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - */ - protected $mutate_rows_rate_limit2 = false; - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - */ - protected $last_scanned_row_responses = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $reverse_scans - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * @type bool $mutate_rows_rate_limit - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * @type bool $mutate_rows_rate_limit2 - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * @type bool $last_scanned_row_responses - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\FeatureFlags::initOnce(); - parent::__construct($data); - } - - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - * @return bool - */ - public function getReverseScans() - { - return $this->reverse_scans; - } - - /** - * Notify the server that the client supports reverse scans. The server will - * reject ReadRowsRequests with the reverse bit set when this is absent. - * - * Generated from protobuf field bool reverse_scans = 1; - * @param bool $var - * @return $this - */ - public function setReverseScans($var) - { - GPBUtil::checkBool($var); - $this->reverse_scans = $var; - - return $this; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - * @return bool - */ - public function getMutateRowsRateLimit() - { - return $this->mutate_rows_rate_limit; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. Due to technical reasons, - * this disables partial retries. - * - * Generated from protobuf field bool mutate_rows_rate_limit = 3; - * @param bool $var - * @return $this - */ - public function setMutateRowsRateLimit($var) - { - GPBUtil::checkBool($var); - $this->mutate_rows_rate_limit = $var; - - return $this; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - * @return bool - */ - public function getMutateRowsRateLimit2() - { - return $this->mutate_rows_rate_limit2; - } - - /** - * Notify the server that the client enables batch write flow control by - * requesting RateLimitInfo from MutateRowsResponse. With partial retries - * enabled. - * - * Generated from protobuf field bool mutate_rows_rate_limit2 = 5; - * @param bool $var - * @return $this - */ - public function setMutateRowsRateLimit2($var) - { - GPBUtil::checkBool($var); - $this->mutate_rows_rate_limit2 = $var; - - return $this; - } - - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - * @return bool - */ - public function getLastScannedRowResponses() - { - return $this->last_scanned_row_responses; - } - - /** - * Notify the server that the client supports the last_scanned_row field - * in ReadRowsResponse for long-running scans. - * - * Generated from protobuf field bool last_scanned_row_responses = 4; - * @param bool $var - * @return $this - */ - public function setLastScannedRowResponses($var) - { - GPBUtil::checkBool($var); - $this->last_scanned_row_responses = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php deleted file mode 100644 index 3376ecb5017e..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/FullReadStatsView.php +++ /dev/null @@ -1,137 +0,0 @@ -google.bigtable.v2.FullReadStatsView - */ -class FullReadStatsView extends \Google\Protobuf\Internal\Message -{ - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - */ - protected $read_iteration_stats = null; - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - */ - protected $request_latency_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadIterationStats $read_iteration_stats - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * @type \Google\Cloud\Bigtable\V2\RequestLatencyStats $request_latency_stats - * Request latency stats describe the time taken to complete a request, from - * the server side. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - * @return \Google\Cloud\Bigtable\V2\ReadIterationStats|null - */ - public function getReadIterationStats() - { - return $this->read_iteration_stats; - } - - public function hasReadIterationStats() - { - return isset($this->read_iteration_stats); - } - - public function clearReadIterationStats() - { - unset($this->read_iteration_stats); - } - - /** - * Iteration stats describe how efficient the read is, e.g. comparing - * rows seen vs. rows returned or cells seen vs cells returned can provide an - * indication of read efficiency (the higher the ratio of seen to retuned the - * better). - * - * Generated from protobuf field .google.bigtable.v2.ReadIterationStats read_iteration_stats = 1; - * @param \Google\Cloud\Bigtable\V2\ReadIterationStats $var - * @return $this - */ - public function setReadIterationStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadIterationStats::class); - $this->read_iteration_stats = $var; - - return $this; - } - - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - * @return \Google\Cloud\Bigtable\V2\RequestLatencyStats|null - */ - public function getRequestLatencyStats() - { - return $this->request_latency_stats; - } - - public function hasRequestLatencyStats() - { - return isset($this->request_latency_stats); - } - - public function clearRequestLatencyStats() - { - unset($this->request_latency_stats); - } - - /** - * Request latency stats describe the time taken to complete a request, from - * the server side. - * - * Generated from protobuf field .google.bigtable.v2.RequestLatencyStats request_latency_stats = 2; - * @param \Google\Cloud\Bigtable\V2\RequestLatencyStats $var - * @return $this - */ - public function setRequestLatencyStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestLatencyStats::class); - $this->request_latency_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php deleted file mode 100644 index 67233adb93bf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsRequest.php +++ /dev/null @@ -1,160 +0,0 @@ -google.bigtable.v2.GenerateInitialChangeStreamPartitionsRequest - */ -class GenerateInitialChangeStreamPartitionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $tableName Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * @return \Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php deleted file mode 100644 index 26f241b3bd8c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/GenerateInitialChangeStreamPartitionsResponse.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.GenerateInitialChangeStreamPartitionsResponse - */ -class GenerateInitialChangeStreamPartitionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - */ - protected $partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * A partition of the change stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * A partition of the change stream. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php deleted file mode 100644 index e7db42cbff65..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.bigtable.v2.MutateRowRequest - */ -class MutateRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mutations; - - /** - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the mutation should be applied. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, array $mutations): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - } - - /** - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the mutation should be applied. - * @param \Google\Cloud\Bigtable\V2\Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyMutationsAppProfileId(string $tableName, string $rowKey, array $mutations, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setMutations($mutations) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the mutation should be applied. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the mutation should be applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMutations() - { - return $this->mutations; - } - - /** - * Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php deleted file mode 100644 index 2a2cc243d6aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.v2.MutateRowResponse - */ -class MutateRowResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php deleted file mode 100644 index 825d37fe5ddf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.bigtable.v2.MutateRowsRequest - */ -class MutateRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to which the mutations should be - * applied. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - */ - protected $app_profile_id = ''; - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entries; - - /** - * @param string $tableName Required. The unique name of the table to which the mutations should be - * applied. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest - * - * @experimental - */ - public static function build(string $tableName, array $entries): self - { - return (new self()) - ->setTableName($tableName) - ->setEntries($entries); - } - - /** - * @param string $tableName Required. The unique name of the table to which the mutations should be - * applied. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\MutateRowsRequest - * - * @experimental - */ - public static function buildFromTableNameEntriesAppProfileId(string $tableName, array $entries, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setEntries($entries) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table to which the mutations should be - * applied. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to which the mutations should be - * applied. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table to which the mutations should be - * applied. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 3; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsRequest.Entry entries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsRequest\Entry::class); - $this->entries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php deleted file mode 100644 index 96659f4574ed..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsRequest/Entry.php +++ /dev/null @@ -1,112 +0,0 @@ -google.bigtable.v2.MutateRowsRequest.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $mutations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * The key of the row to which the `mutations` should be applied. - * @type array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $mutations - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The key of the row to which the `mutations` should be applied. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMutations() - { - return $this->mutations; - } - - /** - * Required. Changes to be atomically applied to the specified row. - * Mutations are applied in order, meaning that earlier mutations can be - * masked by later ones. You must specify at least one mutation. - * - * Generated from protobuf field repeated .google.bigtable.v2.Mutation mutations = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\Mutation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMutations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutations = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsRequest_Entry::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php deleted file mode 100644 index 9467b61e1b39..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse.php +++ /dev/null @@ -1,119 +0,0 @@ -google.bigtable.v2.MutateRowsResponse - */ -class MutateRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - */ - private $entries; - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - */ - protected $rate_limit_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $entries - * One or more results for Entries from the batch request. - * @type \Google\Cloud\Bigtable\V2\RateLimitInfo $rate_limit_info - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEntries() - { - return $this->entries; - } - - /** - * One or more results for Entries from the batch request. - * - * Generated from protobuf field repeated .google.bigtable.v2.MutateRowsResponse.Entry entries = 1; - * @param array<\Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\MutateRowsResponse\Entry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - * @return \Google\Cloud\Bigtable\V2\RateLimitInfo|null - */ - public function getRateLimitInfo() - { - return $this->rate_limit_info; - } - - public function hasRateLimitInfo() - { - return isset($this->rate_limit_info); - } - - public function clearRateLimitInfo() - { - unset($this->rate_limit_info); - } - - /** - * Information about how client should limit the rate (QPS). Primirily used by - * supported official Cloud Bigtable clients. If unset, the rate limit info is - * not provided by the server. - * - * Generated from protobuf field optional .google.bigtable.v2.RateLimitInfo rate_limit_info = 3; - * @param \Google\Cloud\Bigtable\V2\RateLimitInfo $var - * @return $this - */ - public function setRateLimitInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RateLimitInfo::class); - $this->rate_limit_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php deleted file mode 100644 index a6049b0d0792..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/MutateRowsResponse/Entry.php +++ /dev/null @@ -1,130 +0,0 @@ -google.bigtable.v2.MutateRowsResponse.Entry - */ -class Entry extends \Google\Protobuf\Internal\Message -{ - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - */ - protected $index = 0; - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $index - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * @type \Google\Rpc\Status $status - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - * @return int|string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index into the original request's `entries` list of the Entry - * for which a result is being reported. - * - * Generated from protobuf field int64 index = 1; - * @param int|string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt64($var); - $this->index = $var; - - return $this; - } - - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The result of the request Entry identified by `index`. - * Depending on how requests are batched during execution, it is possible - * for one Entry to fail due to an error with another Entry. In the event - * that this occurs, the same error will be reported for both entries. - * - * Generated from protobuf field .google.rpc.Status status = 2; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Entry::class, \Google\Cloud\Bigtable\V2\MutateRowsResponse_Entry::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php deleted file mode 100644 index e47fce180c11..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation.php +++ /dev/null @@ -1,174 +0,0 @@ -google.bigtable.v2.Mutation - */ -class Mutation extends \Google\Protobuf\Internal\Message -{ - protected $mutation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Mutation\SetCell $set_cell - * Set a cell's value. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $delete_from_column - * Deletes cells from a column. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $delete_from_family - * Deletes cells from a column family. - * @type \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $delete_from_row - * Deletes cells from the entire row. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Set a cell's value. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; - * @return \Google\Cloud\Bigtable\V2\Mutation\SetCell|null - */ - public function getSetCell() - { - return $this->readOneof(1); - } - - public function hasSetCell() - { - return $this->hasOneof(1); - } - - /** - * Set a cell's value. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.SetCell set_cell = 1; - * @param \Google\Cloud\Bigtable\V2\Mutation\SetCell $var - * @return $this - */ - public function setSetCell($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\SetCell::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Deletes cells from a column. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn|null - */ - public function getDeleteFromColumn() - { - return $this->readOneof(2); - } - - public function hasDeleteFromColumn() - { - return $this->hasOneof(2); - } - - /** - * Deletes cells from a column. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromColumn delete_from_column = 2; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn $var - * @return $this - */ - public function setDeleteFromColumn($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromColumn::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Deletes cells from a column family. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily|null - */ - public function getDeleteFromFamily() - { - return $this->readOneof(3); - } - - public function hasDeleteFromFamily() - { - return $this->hasOneof(3); - } - - /** - * Deletes cells from a column family. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromFamily delete_from_family = 3; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily $var - * @return $this - */ - public function setDeleteFromFamily($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromFamily::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Deletes cells from the entire row. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; - * @return \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow|null - */ - public function getDeleteFromRow() - { - return $this->readOneof(4); - } - - public function hasDeleteFromRow() - { - return $this->hasOneof(4); - } - - /** - * Deletes cells from the entire row. - * - * Generated from protobuf field .google.bigtable.v2.Mutation.DeleteFromRow delete_from_row = 4; - * @param \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow $var - * @return $this - */ - public function setDeleteFromRow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation\DeleteFromRow::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getMutation() - { - return $this->whichOneof("mutation"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php deleted file mode 100644 index a91638edfa4a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromColumn.php +++ /dev/null @@ -1,157 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromColumn - */ -class DeleteFromColumn extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - */ - protected $time_range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * @type \Google\Cloud\Bigtable\V2\TimestampRange $time_range - * The range of timestamps within which cells should be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column from which cells should be deleted. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - * @return \Google\Cloud\Bigtable\V2\TimestampRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * The range of timestamps within which cells should be deleted. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange time_range = 3; - * @param \Google\Cloud\Bigtable\V2\TimestampRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); - $this->time_range = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromColumn::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromColumn::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php deleted file mode 100644 index 66cdb291bf3c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromFamily.php +++ /dev/null @@ -1,74 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromFamily - */ -class DeleteFromFamily extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family from which cells should be deleted. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromFamily::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromFamily::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php deleted file mode 100644 index 9200902a1780..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/DeleteFromRow.php +++ /dev/null @@ -1,36 +0,0 @@ -google.bigtable.v2.Mutation.DeleteFromRow - */ -class DeleteFromRow extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeleteFromRow::class, \Google\Cloud\Bigtable\V2\Mutation_DeleteFromRow::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php deleted file mode 100644 index b156e5d5d564..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Mutation/SetCell.php +++ /dev/null @@ -1,196 +0,0 @@ -google.bigtable.v2.Mutation.SetCell - */ -class SetCell extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - */ - protected $timestamp_micros = 0; - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * @type int|string $timestamp_micros - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * @type string $value - * The value to be written into the specified cell. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family into which new data should be written. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column into which new data should be written. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The timestamp of the cell into which new data should be written. - * Use -1 for current Bigtable server time. - * Otherwise, the client should set this value itself, noting that the - * default value is a timestamp of zero if the field is left unspecified. - * Values must match the granularity of the table (e.g. micros, millis). - * - * Generated from protobuf field int64 timestamp_micros = 3; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value to be written into the specified cell. - * - * Generated from protobuf field bytes value = 4; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SetCell::class, \Google\Cloud\Bigtable\V2\Mutation_SetCell::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php deleted file mode 100644 index 4daf892b444f..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.bigtable.v2.PingAndWarmRequest - */ -class PingAndWarmRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $name Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * @param string $name Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\PingAndWarmRequest - * - * @experimental - */ - public static function buildFromNameAppProfileId(string $name, string $appProfileId): self - { - return (new self()) - ->setName($name) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * 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 unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * - * 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; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php deleted file mode 100644 index a14857274660..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/PingAndWarmResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.bigtable.v2.PingAndWarmResponse - */ -class PingAndWarmResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php deleted file mode 100644 index db1f756b6be9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RateLimitInfo.php +++ /dev/null @@ -1,159 +0,0 @@ -google.bigtable.v2.RateLimitInfo - */ -class RateLimitInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - */ - protected $period = null; - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - */ - protected $factor = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $period - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * @type float $factor - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getPeriod() - { - return $this->period; - } - - public function hasPeriod() - { - return isset($this->period); - } - - public function clearPeriod() - { - unset($this->period); - } - - /** - * Time that clients should wait before adjusting the target rate again. - * If clients adjust rate too frequently, the impact of the previous - * adjustment may not have been taken into account and may - * over-throttle or under-throttle. If clients adjust rate too slowly, they - * will not be responsive to load changes on server side, and may - * over-throttle or under-throttle. - * - * Generated from protobuf field .google.protobuf.Duration period = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->period = $var; - - return $this; - } - - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - * @return float - */ - public function getFactor() - { - return $this->factor; - } - - /** - * If it has been at least one `period` since the last load adjustment, the - * client should multiply the current load by this value to get the new target - * load. For example, if the current load is 100 and `factor` is 0.8, the new - * target load should be 80. After adjusting, the client should ignore - * `factor` until another `period` has passed. - * The client can measure its load using any unit that's comparable over time - * For example, QPS can be used as long as each request involves a similar - * amount of work. - * - * Generated from protobuf field double factor = 2; - * @param float $var - * @return $this - */ - public function setFactor($var) - { - GPBUtil::checkDouble($var); - $this->factor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php deleted file mode 100644 index cac57eea1345..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamRequest.php +++ /dev/null @@ -1,412 +0,0 @@ -google.bigtable.v2.ReadChangeStreamRequest - */ -class ReadChangeStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - */ - protected $partition = null; - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - */ - protected $heartbeat_duration = null; - protected $start_from; - - /** - * @param string $tableName Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * The partition to read changes from. - * @type \Google\Protobuf\Timestamp $start_time - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * @type \Google\Cloud\Bigtable\V2\StreamContinuationTokens $continuation_tokens - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * @type \Google\Protobuf\Timestamp $end_time - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * @type \Google\Protobuf\Duration $heartbeat_duration - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * The partition to read changes from. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 3; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - - /** - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->readOneof(4); - } - - public function hasStartTime() - { - return $this->hasOneof(4); - } - - /** - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; - * @return \Google\Cloud\Bigtable\V2\StreamContinuationTokens|null - */ - public function getContinuationTokens() - { - return $this->readOneof(6); - } - - public function hasContinuationTokens() - { - return $this->hasOneof(6); - } - - /** - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationTokens continuation_tokens = 6; - * @param \Google\Cloud\Bigtable\V2\StreamContinuationTokens $var - * @return $this - */ - public function setContinuationTokens($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationTokens::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @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); - } - - /** - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getHeartbeatDuration() - { - return $this->heartbeat_duration; - } - - public function hasHeartbeatDuration() - { - return isset($this->heartbeat_duration); - } - - public function clearHeartbeatDuration() - { - unset($this->heartbeat_duration); - } - - /** - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_duration = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setHeartbeatDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->heartbeat_duration = $var; - - return $this; - } - - /** - * @return string - */ - public function getStartFrom() - { - return $this->whichOneof("start_from"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php deleted file mode 100644 index bdacae25dce3..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse.php +++ /dev/null @@ -1,142 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse - */ -class ReadChangeStreamResponse extends \Google\Protobuf\Internal\Message -{ - protected $stream_record; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $data_change - * A mutation to the partition. - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $heartbeat - * A periodic heartbeat message. - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $close_stream - * An indication that the stream should be closed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A mutation to the partition. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange|null - */ - public function getDataChange() - { - return $this->readOneof(1); - } - - public function hasDataChange() - { - return $this->hasOneof(1); - } - - /** - * A mutation to the partition. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange data_change = 1; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange $var - * @return $this - */ - public function setDataChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A periodic heartbeat message. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat|null - */ - public function getHeartbeat() - { - return $this->readOneof(2); - } - - public function hasHeartbeat() - { - return $this->hasOneof(2); - } - - /** - * A periodic heartbeat message. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.Heartbeat heartbeat = 2; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat $var - * @return $this - */ - public function setHeartbeat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\Heartbeat::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An indication that the stream should be closed. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream|null - */ - public function getCloseStream() - { - return $this->readOneof(3); - } - - public function hasCloseStream() - { - return $this->hasOneof(3); - } - - /** - * An indication that the stream should be closed. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.CloseStream close_stream = 3; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream $var - * @return $this - */ - public function setCloseStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\CloseStream::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getStreamRecord() - { - return $this->whichOneof("stream_record"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php deleted file mode 100644 index 4551bb34ed65..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/CloseStream.php +++ /dev/null @@ -1,179 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.CloseStream - */ -class CloseStream extends \Google\Protobuf\Internal\Message -{ - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - */ - protected $status = null; - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - */ - private $continuation_tokens; - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - */ - private $new_partitions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Rpc\Status $status - * The status of the stream. - * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $continuation_tokens - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * @type array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $new_partitions - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of the stream. - * - * Generated from protobuf field .google.rpc.Status status = 1; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getContinuationTokens() - { - return $this->continuation_tokens; - } - - /** - * If non-empty, contains the information needed to resume reading their - * associated partitions. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken continuation_tokens = 2; - * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setContinuationTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->continuation_tokens = $arr; - - return $this; - } - - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getNewPartitions() - { - return $this->new_partitions; - } - - /** - * If non-empty, contains the new partitions to start reading from, which - * are related to but not necessarily identical to the partitions for the - * above `continuation_tokens`. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamPartition new_partitions = 3; - * @param array<\Google\Cloud\Bigtable\V2\StreamPartition>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setNewPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->new_partitions = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CloseStream::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_CloseStream::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php deleted file mode 100644 index 9bb24720fb1a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange.php +++ /dev/null @@ -1,439 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.DataChange - */ -class DataChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - */ - protected $type = 0; - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - */ - protected $source_cluster_id = ''; - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - */ - protected $row_key = ''; - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - */ - protected $commit_timestamp = null; - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - */ - protected $tiebreaker = 0; - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - */ - private $chunks; - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - */ - protected $done = false; - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - */ - protected $token = ''; - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - */ - protected $estimated_low_watermark = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of the mutation. - * @type string $source_cluster_id - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * @type string $row_key - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * @type \Google\Protobuf\Timestamp $commit_timestamp - * The timestamp at which the mutation was applied on the Bigtable server. - * @type int $tiebreaker - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * @type array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $chunks - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * @type bool $done - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * @type string $token - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * @type \Google\Protobuf\Timestamp $estimated_low_watermark - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the mutation. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\DataChange\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - * @return string - */ - public function getSourceClusterId() - { - return $this->source_cluster_id; - } - - /** - * The cluster where the mutation was applied. - * Not set when `type` is `GARBAGE_COLLECTION`. - * - * Generated from protobuf field string source_cluster_id = 2; - * @param string $var - * @return $this - */ - public function setSourceClusterId($var) - { - GPBUtil::checkString($var, True); - $this->source_cluster_id = $var; - - return $this; - } - - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The row key for all mutations that are part of this `DataChange`. - * If the `DataChange` is chunked across multiple messages, then this field - * will only be set for the first message. - * - * Generated from protobuf field bytes row_key = 3; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTimestamp() - { - return $this->commit_timestamp; - } - - public function hasCommitTimestamp() - { - return isset($this->commit_timestamp); - } - - public function clearCommitTimestamp() - { - unset($this->commit_timestamp); - } - - /** - * The timestamp at which the mutation was applied on the Bigtable server. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_timestamp = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_timestamp = $var; - - return $this; - } - - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - * @return int - */ - public function getTiebreaker() - { - return $this->tiebreaker; - } - - /** - * A value that lets stream consumers reconstruct Bigtable's - * conflict resolution semantics. - * https://cloud.google.com/bigtable/docs/writes#conflict-resolution - * In the event that the same row key, column family, column qualifier, - * timestamp are modified on different clusters at the same - * `commit_timestamp`, the mutation with the larger `tiebreaker` will be the - * one chosen for the eventually consistent state of the system. - * - * Generated from protobuf field int32 tiebreaker = 5; - * @param int $var - * @return $this - */ - public function setTiebreaker($var) - { - GPBUtil::checkInt32($var); - $this->tiebreaker = $var; - - return $this; - } - - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChunks() - { - return $this->chunks; - } - - /** - * The mutations associated with this change to the partition. - * May contain complete mutations or chunks of a multi-message chunked - * `DataChange` record. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk chunks = 6; - * @param array<\Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChunks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk::class); - $this->chunks = $arr; - - return $this; - } - - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * When true, indicates that the entire `DataChange` has been read - * and the client can safely process the message. - * - * Generated from protobuf field bool done = 8; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * An encoded position for this stream's partition to restart reading from. - * This token is for the StreamPartition from the request. - * - * Generated from protobuf field string token = 9; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedLowWatermark() - { - return $this->estimated_low_watermark; - } - - public function hasEstimatedLowWatermark() - { - return isset($this->estimated_low_watermark); - } - - public function clearEstimatedLowWatermark() - { - unset($this->estimated_low_watermark); - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedLowWatermark($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_low_watermark = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DataChange::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_DataChange::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php deleted file mode 100644 index 0eb4b8204f45..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/DataChange/Type.php +++ /dev/null @@ -1,72 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.DataChange.Type - */ -class Type -{ - /** - * The type is unspecified. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * A user-initiated mutation. - * - * Generated from protobuf enum USER = 1; - */ - const USER = 1; - /** - * A system-initiated mutation as part of garbage collection. - * https://cloud.google.com/bigtable/docs/garbage-collection - * - * Generated from protobuf enum GARBAGE_COLLECTION = 2; - */ - const GARBAGE_COLLECTION = 2; - /** - * This is a continuation of a multi-message change. - * - * Generated from protobuf enum CONTINUATION = 3; - */ - const CONTINUATION = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::USER => 'USER', - self::GARBAGE_COLLECTION => 'GARBAGE_COLLECTION', - self::CONTINUATION => 'CONTINUATION', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_DataChange_Type::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php deleted file mode 100644 index e20a2f711230..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/Heartbeat.php +++ /dev/null @@ -1,149 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.Heartbeat - */ -class Heartbeat extends \Google\Protobuf\Internal\Message -{ - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - */ - protected $continuation_token = null; - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - */ - protected $estimated_low_watermark = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamContinuationToken $continuation_token - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * @type \Google\Protobuf\Timestamp $estimated_low_watermark - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - * @return \Google\Cloud\Bigtable\V2\StreamContinuationToken|null - */ - public function getContinuationToken() - { - return $this->continuation_token; - } - - public function hasContinuationToken() - { - return isset($this->continuation_token); - } - - public function clearContinuationToken() - { - unset($this->continuation_token); - } - - /** - * A token that can be provided to a subsequent `ReadChangeStream` call - * to pick up reading at the current stream position. - * - * Generated from protobuf field .google.bigtable.v2.StreamContinuationToken continuation_token = 1; - * @param \Google\Cloud\Bigtable\V2\StreamContinuationToken $var - * @return $this - */ - public function setContinuationToken($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->continuation_token = $var; - - return $this; - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEstimatedLowWatermark() - { - return $this->estimated_low_watermark; - } - - public function hasEstimatedLowWatermark() - { - return isset($this->estimated_low_watermark); - } - - public function clearEstimatedLowWatermark() - { - unset($this->estimated_low_watermark); - } - - /** - * An estimate of the commit timestamp that is usually lower than or equal - * to any timestamp for a record that will be delivered in the future on the - * stream. It is possible that, under particular circumstances that a future - * record has a timestamp is is lower than a previously seen timestamp. For - * an example usage see - * https://beam.apache.org/documentation/basics/#watermarks - * - * Generated from protobuf field .google.protobuf.Timestamp estimated_low_watermark = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEstimatedLowWatermark($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->estimated_low_watermark = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Heartbeat::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_Heartbeat::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php deleted file mode 100644 index 861921c6235d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk.php +++ /dev/null @@ -1,136 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.MutationChunk - */ -class MutationChunk extends \Google\Protobuf\Internal\Message -{ - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - */ - protected $chunk_info = null; - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - */ - protected $mutation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $chunk_info - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * @type \Google\Cloud\Bigtable\V2\Mutation $mutation - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - * @return \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo|null - */ - public function getChunkInfo() - { - return $this->chunk_info; - } - - public function hasChunkInfo() - { - return isset($this->chunk_info); - } - - public function clearChunkInfo() - { - unset($this->chunk_info); - } - - /** - * If set, then the mutation is a `SetCell` with a chunked value across - * multiple messages. - * - * Generated from protobuf field .google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo chunk_info = 1; - * @param \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo $var - * @return $this - */ - public function setChunkInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse\MutationChunk\ChunkInfo::class); - $this->chunk_info = $var; - - return $this; - } - - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - * @return \Google\Cloud\Bigtable\V2\Mutation|null - */ - public function getMutation() - { - return $this->mutation; - } - - public function hasMutation() - { - return isset($this->mutation); - } - - public function clearMutation() - { - unset($this->mutation); - } - - /** - * If this is a continuation of a chunked message (`chunked_value_offset` > - * 0), ignore all fields except the `SetCell`'s value and merge it with - * the previous message by concatenating the value fields. - * - * Generated from protobuf field .google.bigtable.v2.Mutation mutation = 2; - * @param \Google\Cloud\Bigtable\V2\Mutation $var - * @return $this - */ - public function setMutation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Mutation::class); - $this->mutation = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MutationChunk::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php deleted file mode 100644 index f8a6c673c8bf..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadChangeStreamResponse/MutationChunk/ChunkInfo.php +++ /dev/null @@ -1,144 +0,0 @@ -google.bigtable.v2.ReadChangeStreamResponse.MutationChunk.ChunkInfo - */ -class ChunkInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - */ - protected $chunked_value_size = 0; - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - */ - protected $chunked_value_offset = 0; - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - */ - protected $last_chunk = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $chunked_value_size - * The total value size of all the chunks that make up the `SetCell`. - * @type int $chunked_value_offset - * The byte offset of this chunk into the total value size of the - * mutation. - * @type bool $last_chunk - * When true, this is the last chunk of a chunked `SetCell`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - * @return int - */ - public function getChunkedValueSize() - { - return $this->chunked_value_size; - } - - /** - * The total value size of all the chunks that make up the `SetCell`. - * - * Generated from protobuf field int32 chunked_value_size = 1; - * @param int $var - * @return $this - */ - public function setChunkedValueSize($var) - { - GPBUtil::checkInt32($var); - $this->chunked_value_size = $var; - - return $this; - } - - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - * @return int - */ - public function getChunkedValueOffset() - { - return $this->chunked_value_offset; - } - - /** - * The byte offset of this chunk into the total value size of the - * mutation. - * - * Generated from protobuf field int32 chunked_value_offset = 2; - * @param int $var - * @return $this - */ - public function setChunkedValueOffset($var) - { - GPBUtil::checkInt32($var); - $this->chunked_value_offset = $var; - - return $this; - } - - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - * @return bool - */ - public function getLastChunk() - { - return $this->last_chunk; - } - - /** - * When true, this is the last chunk of a chunked `SetCell`. - * - * Generated from protobuf field bool last_chunk = 3; - * @param bool $var - * @return $this - */ - public function setLastChunk($var) - { - GPBUtil::checkBool($var); - $this->last_chunk = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ChunkInfo::class, \Google\Cloud\Bigtable\V2\ReadChangeStreamResponse_MutationChunk_ChunkInfo::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php deleted file mode 100644 index f226aa85abc9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadIterationStats.php +++ /dev/null @@ -1,179 +0,0 @@ -google.bigtable.v2.ReadIterationStats - */ -class ReadIterationStats extends \Google\Protobuf\Internal\Message -{ - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - */ - protected $rows_seen_count = 0; - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - */ - protected $rows_returned_count = 0; - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - */ - protected $cells_seen_count = 0; - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - */ - protected $cells_returned_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $rows_seen_count - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * @type int|string $rows_returned_count - * The rows returned as part of the request. - * @type int|string $cells_seen_count - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * @type int|string $cells_returned_count - * The cells returned as part of the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - * @return int|string - */ - public function getRowsSeenCount() - { - return $this->rows_seen_count; - } - - /** - * The rows seen (scanned) as part of the request. This includes the count of - * rows returned, as captured below. - * - * Generated from protobuf field int64 rows_seen_count = 1; - * @param int|string $var - * @return $this - */ - public function setRowsSeenCount($var) - { - GPBUtil::checkInt64($var); - $this->rows_seen_count = $var; - - return $this; - } - - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - * @return int|string - */ - public function getRowsReturnedCount() - { - return $this->rows_returned_count; - } - - /** - * The rows returned as part of the request. - * - * Generated from protobuf field int64 rows_returned_count = 2; - * @param int|string $var - * @return $this - */ - public function setRowsReturnedCount($var) - { - GPBUtil::checkInt64($var); - $this->rows_returned_count = $var; - - return $this; - } - - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - * @return int|string - */ - public function getCellsSeenCount() - { - return $this->cells_seen_count; - } - - /** - * The cells seen (scanned) as part of the request. This includes the count of - * cells returned, as captured below. - * - * Generated from protobuf field int64 cells_seen_count = 3; - * @param int|string $var - * @return $this - */ - public function setCellsSeenCount($var) - { - GPBUtil::checkInt64($var); - $this->cells_seen_count = $var; - - return $this; - } - - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - * @return int|string - */ - public function getCellsReturnedCount() - { - return $this->cells_returned_count; - } - - /** - * The cells returned as part of the request. - * - * Generated from protobuf field int64 cells_returned_count = 4; - * @param int|string $var - * @return $this - */ - public function setCellsReturnedCount($var) - { - GPBUtil::checkInt64($var); - $this->cells_returned_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php deleted file mode 100644 index 18cc99c5361b..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRowRequest - */ -class ReadModifyWriteRowRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - */ - protected $app_profile_id = ''; - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $row_key = ''; - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - private $rules; - - /** - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be - * applied. - * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest - * - * @experimental - */ - public static function build(string $tableName, string $rowKey, array $rules): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setRules($rules); - } - - /** - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be - * applied. - * @param \Google\Cloud\Bigtable\V2\ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\ReadModifyWriteRowRequest - * - * @experimental - */ - public static function buildFromTableNameRowKeyRulesAppProfileId(string $tableName, string $rowKey, array $rules, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setRowKey($rowKey) - ->setRules($rules) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type string $row_key - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * @type array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $rules - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 4; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Required. The key of the row to which the read/modify/write rules should be - * applied. - * - * Generated from protobuf field bytes row_key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRules() - { - return $this->rules; - } - - /** - * Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadModifyWriteRule rules = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param array<\Google\Cloud\Bigtable\V2\ReadModifyWriteRule>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadModifyWriteRule::class); - $this->rules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php deleted file mode 100644 index 1b1c1cdac4a9..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRowResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRowResponse - */ -class ReadModifyWriteRowResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - */ - protected $row = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\Row $row - * A Row containing the new contents of all cells modified by the request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - * @return \Google\Cloud\Bigtable\V2\Row|null - */ - public function getRow() - { - return $this->row; - } - - public function hasRow() - { - return isset($this->row); - } - - public function clearRow() - { - unset($this->row); - } - - /** - * A Row containing the new contents of all cells modified by the request. - * - * Generated from protobuf field .google.bigtable.v2.Row row = 1; - * @param \Google\Cloud\Bigtable\V2\Row $var - * @return $this - */ - public function setRow($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\Row::class); - $this->row = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php deleted file mode 100644 index 1afafb1f597a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadModifyWriteRule.php +++ /dev/null @@ -1,204 +0,0 @@ -google.bigtable.v2.ReadModifyWriteRule - */ -class ReadModifyWriteRule extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - */ - protected $family_name = ''; - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - */ - protected $column_qualifier = ''; - protected $rule; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $family_name - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * @type string $column_qualifier - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * @type string $append_value - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * @type int|string $increment_amount - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @return string - */ - public function getFamilyName() - { - return $this->family_name; - } - - /** - * The name of the family to which the read/modify/write should be applied. - * Must match `[-_.a-zA-Z0-9]+` - * - * Generated from protobuf field string family_name = 1; - * @param string $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkString($var, True); - $this->family_name = $var; - - return $this; - } - - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @return string - */ - public function getColumnQualifier() - { - return $this->column_qualifier; - } - - /** - * The qualifier of the column to which the read/modify/write should be - * applied. - * Can be any byte string, including the empty string. - * - * Generated from protobuf field bytes column_qualifier = 2; - * @param string $var - * @return $this - */ - public function setColumnQualifier($var) - { - GPBUtil::checkString($var, False); - $this->column_qualifier = $var; - - return $this; - } - - /** - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * - * Generated from protobuf field bytes append_value = 3; - * @return string - */ - public function getAppendValue() - { - return $this->readOneof(3); - } - - public function hasAppendValue() - { - return $this->hasOneof(3); - } - - /** - * Rule specifying that `append_value` be appended to the existing value. - * If the targeted cell is unset, it will be treated as containing the - * empty string. - * - * Generated from protobuf field bytes append_value = 3; - * @param string $var - * @return $this - */ - public function setAppendValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * - * Generated from protobuf field int64 increment_amount = 4; - * @return int|string - */ - public function getIncrementAmount() - { - return $this->readOneof(4); - } - - public function hasIncrementAmount() - { - return $this->hasOneof(4); - } - - /** - * Rule specifying that `increment_amount` be added to the existing value. - * If the targeted cell is unset, it will be treated as containing a zero. - * Otherwise, the targeted cell must contain an 8-byte value (interpreted - * as a 64-bit big-endian signed integer), or the entire request will fail. - * - * Generated from protobuf field int64 increment_amount = 4; - * @param int|string $var - * @return $this - */ - public function setIncrementAmount($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getRule() - { - return $this->whichOneof("rule"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php deleted file mode 100644 index b30cf2f29f88..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest.php +++ /dev/null @@ -1,382 +0,0 @@ -google.bigtable.v2.ReadRowsRequest - */ -class ReadRowsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - */ - protected $app_profile_id = ''; - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - */ - protected $rows = null; - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - */ - protected $filter = null; - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - */ - protected $rows_limit = 0; - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - */ - protected $request_stats_view = 0; - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - */ - protected $reversed = false; - - /** - * @param string $tableName Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\ReadRowsRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type \Google\Cloud\Bigtable\V2\RowSet $rows - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * @type \Google\Cloud\Bigtable\V2\RowFilter $filter - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * @type int|string $rows_limit - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * @type int $request_stats_view - * The view into RequestStats, as described above. - * @type bool $reversed - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 5; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - * @return \Google\Cloud\Bigtable\V2\RowSet|null - */ - public function getRows() - { - return $this->rows; - } - - public function hasRows() - { - return isset($this->rows); - } - - public function clearRows() - { - unset($this->rows); - } - - /** - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * - * Generated from protobuf field .google.bigtable.v2.RowSet rows = 2; - * @param \Google\Cloud\Bigtable\V2\RowSet $var - * @return $this - */ - public function setRows($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowSet::class); - $this->rows = $var; - - return $this; - } - - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getFilter() - { - return $this->filter; - } - - public function hasFilter() - { - return isset($this->filter); - } - - public function clearFilter() - { - unset($this->filter); - } - - /** - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter filter = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filter = $var; - - return $this; - } - - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - * @return int|string - */ - public function getRowsLimit() - { - return $this->rows_limit; - } - - /** - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * - * Generated from protobuf field int64 rows_limit = 4; - * @param int|string $var - * @return $this - */ - public function setRowsLimit($var) - { - GPBUtil::checkInt64($var); - $this->rows_limit = $var; - - return $this; - } - - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - * @return int - */ - public function getRequestStatsView() - { - return $this->request_stats_view; - } - - /** - * The view into RequestStats, as described above. - * - * Generated from protobuf field .google.bigtable.v2.ReadRowsRequest.RequestStatsView request_stats_view = 6; - * @param int $var - * @return $this - */ - public function setRequestStatsView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Bigtable\V2\ReadRowsRequest\RequestStatsView::class); - $this->request_stats_view = $var; - - return $this; - } - - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - * @return bool - */ - public function getReversed() - { - return $this->reversed; - } - - /** - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * Example result set: - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * - * Generated from protobuf field bool reversed = 7; - * @param bool $var - * @return $this - */ - public function setReversed($var) - { - GPBUtil::checkBool($var); - $this->reversed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php deleted file mode 100644 index 9dd641bbd6dc..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsRequest/RequestStatsView.php +++ /dev/null @@ -1,67 +0,0 @@ -google.bigtable.v2.ReadRowsRequest.RequestStatsView - */ -class RequestStatsView -{ - /** - * The default / unset value. The API will default to the NONE option below. - * - * Generated from protobuf enum REQUEST_STATS_VIEW_UNSPECIFIED = 0; - */ - const REQUEST_STATS_VIEW_UNSPECIFIED = 0; - /** - * Do not include any RequestStats in the response. This will leave the - * RequestStats embedded message unset in the response. - * - * Generated from protobuf enum REQUEST_STATS_NONE = 1; - */ - const REQUEST_STATS_NONE = 1; - /** - * Include the full set of available RequestStats in the response, - * applicable to this read. - * - * Generated from protobuf enum REQUEST_STATS_FULL = 2; - */ - const REQUEST_STATS_FULL = 2; - - private static $valueToName = [ - self::REQUEST_STATS_VIEW_UNSPECIFIED => 'REQUEST_STATS_VIEW_UNSPECIFIED', - self::REQUEST_STATS_NONE => 'REQUEST_STATS_NONE', - self::REQUEST_STATS_FULL => 'REQUEST_STATS_FULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RequestStatsView::class, \Google\Cloud\Bigtable\V2\ReadRowsRequest_RequestStatsView::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php deleted file mode 100644 index 024cc02abc0c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse.php +++ /dev/null @@ -1,233 +0,0 @@ -google.bigtable.v2.ReadRowsResponse - */ -class ReadRowsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - */ - private $chunks; - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - */ - protected $last_scanned_row_key = ''; - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - */ - protected $request_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $chunks - * A collection of a row's contents as part of the read request. - * @type string $last_scanned_row_key - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * @type \Google\Cloud\Bigtable\V2\RequestStats $request_stats - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getChunks() - { - return $this->chunks; - } - - /** - * A collection of a row's contents as part of the read request. - * - * Generated from protobuf field repeated .google.bigtable.v2.ReadRowsResponse.CellChunk chunks = 1; - * @param array<\Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setChunks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\ReadRowsResponse\CellChunk::class); - $this->chunks = $arr; - - return $this; - } - - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - * @return string - */ - public function getLastScannedRowKey() - { - return $this->last_scanned_row_key; - } - - /** - * Optionally the server might return the row key of the last row it - * has scanned. The client can use this to construct a more - * efficient retry request if needed: any row keys or portions of - * ranges less than this row key can be dropped from the request. - * This is primarily useful for cases where the server has read a - * lot of data that was filtered out since the last committed row - * key, allowing the client to skip that work on a retry. - * - * Generated from protobuf field bytes last_scanned_row_key = 2; - * @param string $var - * @return $this - */ - public function setLastScannedRowKey($var) - { - GPBUtil::checkString($var, False); - $this->last_scanned_row_key = $var; - - return $this; - } - - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - * @return \Google\Cloud\Bigtable\V2\RequestStats|null - */ - public function getRequestStats() - { - return $this->request_stats; - } - - public function hasRequestStats() - { - return isset($this->request_stats); - } - - public function clearRequestStats() - { - unset($this->request_stats); - } - - /** - * If requested, provide enhanced query performance statistics. The semantics - * dictate: - * * request_stats is empty on every (streamed) response, except - * * request_stats has non-empty information after all chunks have been - * streamed, where the ReadRowsResponse message only contains - * request_stats. - * * For example, if a read request would have returned an empty - * response instead a single ReadRowsResponse is streamed with empty - * chunks and request_stats filled. - * Visually, response messages will stream as follows: - * ... -> {chunks: [...]} -> {chunks: [], request_stats: {...}} - * \______________________/ \________________________________/ - * Primary response Trailer of RequestStats info - * Or if the read did not return any values: - * {chunks: [], request_stats: {...}} - * \________________________________/ - * Trailer of RequestStats info - * - * Generated from protobuf field .google.bigtable.v2.RequestStats request_stats = 3; - * @param \Google\Cloud\Bigtable\V2\RequestStats $var - * @return $this - */ - public function setRequestStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RequestStats::class); - $this->request_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php deleted file mode 100644 index 0ff8217f7de4..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ReadRowsResponse/CellChunk.php +++ /dev/null @@ -1,560 +0,0 @@ -google.bigtable.v2.ReadRowsResponse.CellChunk - */ -class CellChunk extends \Google\Protobuf\Internal\Message -{ - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - */ - protected $family_name = null; - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - */ - protected $qualifier = null; - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - */ - protected $timestamp_micros = 0; - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - */ - private $labels; - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - */ - protected $value = ''; - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - */ - protected $value_size = 0; - protected $row_status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * @type \Google\Protobuf\StringValue $family_name - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * @type \Google\Protobuf\BytesValue $qualifier - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * @type int|string $timestamp_micros - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * @type array|\Google\Protobuf\Internal\RepeatedField $labels - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * @type string $value - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * @type int $value_size - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * @type bool $reset_row - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * @type bool $commit_row - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * The row key for this chunk of data. If the row key is empty, - * this CellChunk is a continuation of the same row as the previous - * CellChunk in the response stream, even if that CellChunk was in a - * previous ReadRowsResponse message. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @return \Google\Protobuf\StringValue|null - */ - public function getFamilyName() - { - return $this->family_name; - } - - public function hasFamilyName() - { - return isset($this->family_name); - } - - public function clearFamilyName() - { - unset($this->family_name); - } - - /** - * Returns the unboxed value from getFamilyName() - - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @return string|null - */ - public function getFamilyNameUnwrapped() - { - return $this->readWrapperValue("family_name"); - } - - /** - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @param \Google\Protobuf\StringValue $var - * @return $this - */ - public function setFamilyName($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\StringValue::class); - $this->family_name = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\StringValue object. - - * The column family name for this chunk of data. If this message - * is not present this CellChunk is a continuation of the same column - * family as the previous CellChunk. The empty string can occur as a - * column family name in a response so clients must check - * explicitly for the presence of this message, not just for - * `family_name.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.StringValue family_name = 2; - * @param string|null $var - * @return $this - */ - public function setFamilyNameUnwrapped($var) - { - $this->writeWrapperValue("family_name", $var); - return $this;} - - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @return \Google\Protobuf\BytesValue|null - */ - public function getQualifier() - { - return $this->qualifier; - } - - public function hasQualifier() - { - return isset($this->qualifier); - } - - public function clearQualifier() - { - unset($this->qualifier); - } - - /** - * Returns the unboxed value from getQualifier() - - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @return string|null - */ - public function getQualifierUnwrapped() - { - return $this->readWrapperValue("qualifier"); - } - - /** - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @param \Google\Protobuf\BytesValue $var - * @return $this - */ - public function setQualifier($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BytesValue::class); - $this->qualifier = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BytesValue object. - - * The column qualifier for this chunk of data. If this message - * is not present, this CellChunk is a continuation of the same column - * as the previous CellChunk. Column qualifiers may be empty so - * clients must check for the presence of this message, not just - * for `qualifier.value` being non-empty. - * - * Generated from protobuf field .google.protobuf.BytesValue qualifier = 3; - * @param string|null $var - * @return $this - */ - public function setQualifierUnwrapped($var) - { - $this->writeWrapperValue("qualifier", $var); - return $this;} - - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - * @return int|string - */ - public function getTimestampMicros() - { - return $this->timestamp_micros; - } - - /** - * The cell's stored timestamp, which also uniquely identifies it - * within its column. Values are always expressed in - * microseconds, but individual tables may set a coarser - * granularity to further restrict the allowed values. For - * example, a table which specifies millisecond granularity will - * only allow values of `timestamp_micros` which are multiples of - * 1000. Timestamps are only set in the first CellChunk per cell - * (for cells split into multiple chunks). - * - * Generated from protobuf field int64 timestamp_micros = 4; - * @param int|string $var - * @return $this - */ - public function setTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->timestamp_micros = $var; - - return $this; - } - - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels applied to the cell by a - * [RowFilter][google.bigtable.v2.RowFilter]. Labels are only set - * on the first CellChunk per cell. - * - * Generated from protobuf field repeated string labels = 5; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value stored in the cell. Cell values can be split across - * multiple CellChunks. In that case only the value field will be - * set in CellChunks after the first: the timestamp and labels - * will only be present in the first CellChunk, even if the first - * CellChunk came in a previous ReadRowsResponse. - * - * Generated from protobuf field bytes value = 6; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, False); - $this->value = $var; - - return $this; - } - - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - * @return int - */ - public function getValueSize() - { - return $this->value_size; - } - - /** - * If this CellChunk is part of a chunked cell value and this is - * not the final chunk of that cell, value_size will be set to the - * total length of the cell value. The client can use this size - * to pre-allocate memory to hold the full cell value. - * - * Generated from protobuf field int32 value_size = 7; - * @param int $var - * @return $this - */ - public function setValueSize($var) - { - GPBUtil::checkInt32($var); - $this->value_size = $var; - - return $this; - } - - /** - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * - * Generated from protobuf field bool reset_row = 8; - * @return bool - */ - public function getResetRow() - { - return $this->readOneof(8); - } - - public function hasResetRow() - { - return $this->hasOneof(8); - } - - /** - * Indicates that the client should drop all previous chunks for - * `row_key`, as it will be re-read from the beginning. - * - * Generated from protobuf field bool reset_row = 8; - * @param bool $var - * @return $this - */ - public function setResetRow($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * - * Generated from protobuf field bool commit_row = 9; - * @return bool - */ - public function getCommitRow() - { - return $this->readOneof(9); - } - - public function hasCommitRow() - { - return $this->hasOneof(9); - } - - /** - * Indicates that the client can safely process all previous chunks for - * `row_key`, as its data has been fully read. - * - * Generated from protobuf field bool commit_row = 9; - * @param bool $var - * @return $this - */ - public function setCommitRow($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getRowStatus() - { - return $this->whichOneof("row_status"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CellChunk::class, \Google\Cloud\Bigtable\V2\ReadRowsResponse_CellChunk::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php deleted file mode 100644 index 26a852ba8ea8..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestLatencyStats.php +++ /dev/null @@ -1,135 +0,0 @@ -google.bigtable.v2.RequestLatencyStats - */ -class RequestLatencyStats extends \Google\Protobuf\Internal\Message -{ - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - */ - protected $frontend_server_latency = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $frontend_server_latency - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getFrontendServerLatency() - { - return $this->frontend_server_latency; - } - - public function hasFrontendServerLatency() - { - return isset($this->frontend_server_latency); - } - - public function clearFrontendServerLatency() - { - unset($this->frontend_server_latency); - } - - /** - * The latency measured by the frontend server handling this request, from - * when the request was received, to when this value is sent back in the - * response. For more context on the component that is measuring this latency, - * see: https://cloud.google.com/bigtable/docs/overview - * Note: This value may be slightly shorter than the value reported into - * aggregate latency metrics in Monitoring for this request - * (https://cloud.google.com/bigtable/docs/monitoring-instance) as this value - * needs to be sent in the response before the latency measurement including - * that transmission is finalized. - * Note: This value includes the end-to-end latency of contacting nodes in - * the targeted cluster, e.g. measuring from when the first byte arrives at - * the frontend server, to when this value is sent back as the last value in - * the response, including any latency incurred by contacting nodes, waiting - * for results from nodes, and finally sending results from nodes back to the - * caller. - * - * Generated from protobuf field .google.protobuf.Duration frontend_server_latency = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setFrontendServerLatency($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->frontend_server_latency = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php deleted file mode 100644 index 9726ac0d3f26..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RequestStats.php +++ /dev/null @@ -1,81 +0,0 @@ -google.bigtable.v2.RequestStats - */ -class RequestStats extends \Google\Protobuf\Internal\Message -{ - protected $stats_view; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\FullReadStatsView $full_read_stats_view - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\RequestStats::initOnce(); - parent::__construct($data); - } - - /** - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * - * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; - * @return \Google\Cloud\Bigtable\V2\FullReadStatsView|null - */ - public function getFullReadStatsView() - { - return $this->readOneof(1); - } - - public function hasFullReadStatsView() - { - return $this->hasOneof(1); - } - - /** - * Available with the ReadRowsRequest.RequestStatsView.REQUEST_STATS_FULL - * view, see package google.bigtable.v2. - * - * Generated from protobuf field .google.bigtable.v2.FullReadStatsView full_read_stats_view = 1; - * @param \Google\Cloud\Bigtable\V2\FullReadStatsView $var - * @return $this - */ - public function setFullReadStatsView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\FullReadStatsView::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getStatsView() - { - return $this->whichOneof("stats_view"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php deleted file mode 100644 index 08a68a68ff05..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ResponseParams.php +++ /dev/null @@ -1,128 +0,0 @@ -google.bigtable.v2.ResponseParams - */ -class ResponseParams extends \Google\Protobuf\Internal\Message -{ - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - */ - protected $zone_id = null; - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - */ - protected $cluster_id = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $zone_id - * The cloud bigtable zone associated with the cluster. - * @type string $cluster_id - * Identifier for a cluster that represents set of - * bigtable resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\ResponseParams::initOnce(); - parent::__construct($data); - } - - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - * @return string - */ - public function getZoneId() - { - return isset($this->zone_id) ? $this->zone_id : ''; - } - - public function hasZoneId() - { - return isset($this->zone_id); - } - - public function clearZoneId() - { - unset($this->zone_id); - } - - /** - * The cloud bigtable zone associated with the cluster. - * - * Generated from protobuf field optional string zone_id = 1; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - * @return string - */ - public function getClusterId() - { - return isset($this->cluster_id) ? $this->cluster_id : ''; - } - - public function hasClusterId() - { - return isset($this->cluster_id); - } - - public function clearClusterId() - { - unset($this->cluster_id); - } - - /** - * Identifier for a cluster that represents set of - * bigtable resources. - * - * Generated from protobuf field optional string cluster_id = 2; - * @param string $var - * @return $this - */ - public function setClusterId($var) - { - GPBUtil::checkString($var, True); - $this->cluster_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php deleted file mode 100644 index ad1d56187e7a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/Row.php +++ /dev/null @@ -1,114 +0,0 @@ -google.bigtable.v2.Row - */ -class Row extends \Google\Protobuf\Internal\Message -{ - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - */ - protected $key = ''; - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - */ - private $families; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * @type array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $families - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The unique key which identifies this row within its table. This is the same - * key that's used to identify the row in, for example, a MutateRowRequest. - * May contain any non-empty byte string up to 4KiB in length. - * - * Generated from protobuf field bytes key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, False); - $this->key = $var; - - return $this; - } - - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFamilies() - { - return $this->families; - } - - /** - * May be empty, but only if the entire row is empty. - * The mutual ordering of column families is not specified. - * - * Generated from protobuf field repeated .google.bigtable.v2.Family families = 2; - * @param array<\Google\Cloud\Bigtable\V2\Family>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFamilies($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\Family::class); - $this->families = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php deleted file mode 100644 index 3d05e40a7922..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter.php +++ /dev/null @@ -1,990 +0,0 @@ -google.bigtable.v2.RowFilter - */ -class RowFilter extends \Google\Protobuf\Internal\Message -{ - protected $filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowFilter\Chain $chain - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * @type \Google\Cloud\Bigtable\V2\RowFilter\Interleave $interleave - * Applies several RowFilters to the data in parallel and combines the - * results. - * @type \Google\Cloud\Bigtable\V2\RowFilter\Condition $condition - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * @type bool $sink - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * @type bool $pass_all_filter - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * @type bool $block_all_filter - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * @type string $row_key_regex_filter - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * @type float $row_sample_filter - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * @type string $family_name_regex_filter - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * @type string $column_qualifier_regex_filter - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * @type \Google\Cloud\Bigtable\V2\ColumnRange $column_range_filter - * Matches only cells from columns within the given range. - * @type \Google\Cloud\Bigtable\V2\TimestampRange $timestamp_range_filter - * Matches only cells with timestamps within the given range. - * @type string $value_regex_filter - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * @type \Google\Cloud\Bigtable\V2\ValueRange $value_range_filter - * Matches only cells with values that fall within the given range. - * @type int $cells_per_row_offset_filter - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type int $cells_per_row_limit_filter - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type int $cells_per_column_limit_filter - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * @type bool $strip_value_transformer - * Replaces each cell's value with the empty string. - * @type string $apply_label_transformer - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Chain|null - */ - public function getChain() - { - return $this->readOneof(1); - } - - public function hasChain() - { - return $this->hasOneof(1); - } - - /** - * Applies several RowFilters to the data in sequence, progressively - * narrowing the results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Chain chain = 1; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Chain $var - * @return $this - */ - public function setChain($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Chain::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Applies several RowFilters to the data in parallel and combines the - * results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Interleave|null - */ - public function getInterleave() - { - return $this->readOneof(2); - } - - public function hasInterleave() - { - return $this->hasOneof(2); - } - - /** - * Applies several RowFilters to the data in parallel and combines the - * results. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Interleave interleave = 2; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Interleave $var - * @return $this - */ - public function setInterleave($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Interleave::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter\Condition|null - */ - public function getCondition() - { - return $this->readOneof(3); - } - - public function hasCondition() - { - return $this->hasOneof(3); - } - - /** - * Applies one of two possible RowFilters to the data based on the output of - * a predicate RowFilter. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter.Condition condition = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter\Condition $var - * @return $this - */ - public function setCondition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter\Condition::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * - * Generated from protobuf field bool sink = 16; - * @return bool - */ - public function getSink() - { - return $this->readOneof(16); - } - - public function hasSink() - { - return $this->hasOneof(16); - } - - /** - * ADVANCED USE ONLY. - * Hook for introspection into the RowFilter. Outputs all cells directly to - * the output of the read rather than to any parent filter. Consider the - * following example: - * Chain( - * FamilyRegex("A"), - * Interleave( - * All(), - * Chain(Label("foo"), Sink()) - * ), - * QualifierRegex("B") - * ) - * A,A,1,w - * A,B,2,x - * B,B,4,z - * | - * FamilyRegex("A") - * | - * A,A,1,w - * A,B,2,x - * | - * +------------+-------------+ - * | | - * All() Label(foo) - * | | - * A,A,1,w A,A,1,w,labels:[foo] - * A,B,2,x A,B,2,x,labels:[foo] - * | | - * | Sink() --------------+ - * | | | - * +------------+ x------+ A,A,1,w,labels:[foo] - * | A,B,2,x,labels:[foo] - * A,A,1,w | - * A,B,2,x | - * | | - * QualifierRegex("B") | - * | | - * A,B,2,x | - * | | - * +--------------------------------+ - * | - * A,A,1,w,labels:[foo] - * A,B,2,x,labels:[foo] // could be switched - * A,B,2,x // could be switched - * Despite being excluded by the qualifier filter, a copy of every cell - * that reaches the sink is present in the final result. - * As with an [Interleave][google.bigtable.v2.RowFilter.Interleave], - * duplicate cells are possible, and appear in an unspecified mutual order. - * In this case we have a duplicate with column "A:B" and timestamp 2, - * because one copy passed through the all filter while the other was - * passed through the label and sink. Note that one copy has label "foo", - * while the other does not. - * Cannot be used within the `predicate_filter`, `true_filter`, or - * `false_filter` of a [Condition][google.bigtable.v2.RowFilter.Condition]. - * - * Generated from protobuf field bool sink = 16; - * @param bool $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(16, $var); - - return $this; - } - - /** - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * - * Generated from protobuf field bool pass_all_filter = 17; - * @return bool - */ - public function getPassAllFilter() - { - return $this->readOneof(17); - } - - public function hasPassAllFilter() - { - return $this->hasOneof(17); - } - - /** - * Matches all cells, regardless of input. Functionally equivalent to - * leaving `filter` unset, but included for completeness. - * - * Generated from protobuf field bool pass_all_filter = 17; - * @param bool $var - * @return $this - */ - public function setPassAllFilter($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * - * Generated from protobuf field bool block_all_filter = 18; - * @return bool - */ - public function getBlockAllFilter() - { - return $this->readOneof(18); - } - - public function hasBlockAllFilter() - { - return $this->hasOneof(18); - } - - /** - * Does not match any cells, regardless of input. Useful for temporarily - * disabling just part of a filter. - * - * Generated from protobuf field bool block_all_filter = 18; - * @param bool $var - * @return $this - */ - public function setBlockAllFilter($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * - * Generated from protobuf field bytes row_key_regex_filter = 4; - * @return string - */ - public function getRowKeyRegexFilter() - { - return $this->readOneof(4); - } - - public function hasRowKeyRegexFilter() - { - return $this->hasOneof(4); - } - - /** - * Matches only cells from rows whose keys satisfy the given RE2 regex. In - * other words, passes through the entire row when the key matches, and - * otherwise produces an empty row. - * Note that, since row keys can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary key. - * - * Generated from protobuf field bytes row_key_regex_filter = 4; - * @param string $var - * @return $this - */ - public function setRowKeyRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * - * Generated from protobuf field double row_sample_filter = 14; - * @return float - */ - public function getRowSampleFilter() - { - return $this->readOneof(14); - } - - public function hasRowSampleFilter() - { - return $this->hasOneof(14); - } - - /** - * Matches all cells from a row with probability p, and matches no cells - * from the row with probability 1-p. - * - * Generated from protobuf field double row_sample_filter = 14; - * @param float $var - * @return $this - */ - public function setRowSampleFilter($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * - * Generated from protobuf field string family_name_regex_filter = 5; - * @return string - */ - public function getFamilyNameRegexFilter() - { - return $this->readOneof(5); - } - - public function hasFamilyNameRegexFilter() - { - return $this->hasOneof(5); - } - - /** - * Matches only cells from columns whose families satisfy the given RE2 - * regex. For technical reasons, the regex must not contain the `:` - * character, even if it is not being used as a literal. - * Note that, since column families cannot contain the new line character - * `\n`, it is sufficient to use `.` as a full wildcard when matching - * column family names. - * - * Generated from protobuf field string family_name_regex_filter = 5; - * @param string $var - * @return $this - */ - public function setFamilyNameRegexFilter($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * - * Generated from protobuf field bytes column_qualifier_regex_filter = 6; - * @return string - */ - public function getColumnQualifierRegexFilter() - { - return $this->readOneof(6); - } - - public function hasColumnQualifierRegexFilter() - { - return $this->hasOneof(6); - } - - /** - * Matches only cells from columns whose qualifiers satisfy the given RE2 - * regex. - * Note that, since column qualifiers can contain arbitrary bytes, the `\C` - * escape sequence must be used if a true wildcard is desired. The `.` - * character will not match the new line character `\n`, which may be - * present in a binary qualifier. - * - * Generated from protobuf field bytes column_qualifier_regex_filter = 6; - * @param string $var - * @return $this - */ - public function setColumnQualifierRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Matches only cells from columns within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; - * @return \Google\Cloud\Bigtable\V2\ColumnRange|null - */ - public function getColumnRangeFilter() - { - return $this->readOneof(7); - } - - public function hasColumnRangeFilter() - { - return $this->hasOneof(7); - } - - /** - * Matches only cells from columns within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ColumnRange column_range_filter = 7; - * @param \Google\Cloud\Bigtable\V2\ColumnRange $var - * @return $this - */ - public function setColumnRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ColumnRange::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Matches only cells with timestamps within the given range. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; - * @return \Google\Cloud\Bigtable\V2\TimestampRange|null - */ - public function getTimestampRangeFilter() - { - return $this->readOneof(8); - } - - public function hasTimestampRangeFilter() - { - return $this->hasOneof(8); - } - - /** - * Matches only cells with timestamps within the given range. - * - * Generated from protobuf field .google.bigtable.v2.TimestampRange timestamp_range_filter = 8; - * @param \Google\Cloud\Bigtable\V2\TimestampRange $var - * @return $this - */ - public function setTimestampRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\TimestampRange::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * - * Generated from protobuf field bytes value_regex_filter = 9; - * @return string - */ - public function getValueRegexFilter() - { - return $this->readOneof(9); - } - - public function hasValueRegexFilter() - { - return $this->hasOneof(9); - } - - /** - * Matches only cells with values that satisfy the given regular expression. - * Note that, since cell values can contain arbitrary bytes, the `\C` escape - * sequence must be used if a true wildcard is desired. The `.` character - * will not match the new line character `\n`, which may be present in a - * binary value. - * - * Generated from protobuf field bytes value_regex_filter = 9; - * @param string $var - * @return $this - */ - public function setValueRegexFilter($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Matches only cells with values that fall within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; - * @return \Google\Cloud\Bigtable\V2\ValueRange|null - */ - public function getValueRangeFilter() - { - return $this->readOneof(15); - } - - public function hasValueRangeFilter() - { - return $this->hasOneof(15); - } - - /** - * Matches only cells with values that fall within the given range. - * - * Generated from protobuf field .google.bigtable.v2.ValueRange value_range_filter = 15; - * @param \Google\Cloud\Bigtable\V2\ValueRange $var - * @return $this - */ - public function setValueRangeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\ValueRange::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_offset_filter = 10; - * @return int - */ - public function getCellsPerRowOffsetFilter() - { - return $this->readOneof(10); - } - - public function hasCellsPerRowOffsetFilter() - { - return $this->hasOneof(10); - } - - /** - * Skips the first N cells of each row, matching all subsequent cells. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_offset_filter = 10; - * @param int $var - * @return $this - */ - public function setCellsPerRowOffsetFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_limit_filter = 11; - * @return int - */ - public function getCellsPerRowLimitFilter() - { - return $this->readOneof(11); - } - - public function hasCellsPerRowLimitFilter() - { - return $this->hasOneof(11); - } - - /** - * Matches only the first N cells of each row. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_row_limit_filter = 11; - * @param int $var - * @return $this - */ - public function setCellsPerRowLimitFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_column_limit_filter = 12; - * @return int - */ - public function getCellsPerColumnLimitFilter() - { - return $this->readOneof(12); - } - - public function hasCellsPerColumnLimitFilter() - { - return $this->hasOneof(12); - } - - /** - * Matches only the most recent N cells within each column. For example, - * if N=2, this filter would match column `foo:bar` at timestamps 10 and 9, - * skip all earlier cells in `foo:bar`, and then begin matching again in - * column `foo:bar2`. - * If duplicate cells are present, as is possible when using an Interleave, - * each copy of the cell is counted separately. - * - * Generated from protobuf field int32 cells_per_column_limit_filter = 12; - * @param int $var - * @return $this - */ - public function setCellsPerColumnLimitFilter($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Replaces each cell's value with the empty string. - * - * Generated from protobuf field bool strip_value_transformer = 13; - * @return bool - */ - public function getStripValueTransformer() - { - return $this->readOneof(13); - } - - public function hasStripValueTransformer() - { - return $this->hasOneof(13); - } - - /** - * Replaces each cell's value with the empty string. - * - * Generated from protobuf field bool strip_value_transformer = 13; - * @param bool $var - * @return $this - */ - public function setStripValueTransformer($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * - * Generated from protobuf field string apply_label_transformer = 19; - * @return string - */ - public function getApplyLabelTransformer() - { - return $this->readOneof(19); - } - - public function hasApplyLabelTransformer() - { - return $this->hasOneof(19); - } - - /** - * Applies the given label to all cells in the output row. This allows - * the client to determine which results were produced from which part of - * the filter. - * Values must be at most 15 characters in length, and match the RE2 - * pattern `[a-z0-9\\-]+` - * Due to a technical limitation, it is not currently possible to apply - * multiple labels to a cell. As a result, a Chain may have no more than - * one sub-filter which contains a `apply_label_transformer`. It is okay for - * an Interleave to contain multiple `apply_label_transformers`, as they - * will be applied to separate copies of the input. This may be relaxed in - * the future. - * - * Generated from protobuf field string apply_label_transformer = 19; - * @param string $var - * @return $this - */ - public function setApplyLabelTransformer($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilter() - { - return $this->whichOneof("filter"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php deleted file mode 100644 index 5d9a60a3cea2..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Chain.php +++ /dev/null @@ -1,78 +0,0 @@ -google.bigtable.v2.RowFilter.Chain - */ -class Chain extends \Google\Protobuf\Internal\Message -{ - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The elements of "filters" are chained together to process the input row: - * in row -> f(0) -> intermediate row -> f(1) -> ... -> f(N) -> out row - * The full chain is executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Chain::class, \Google\Cloud\Bigtable\V2\RowFilter_Chain::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php deleted file mode 100644 index f7e66bf81817..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Condition.php +++ /dev/null @@ -1,189 +0,0 @@ -google.bigtable.v2.RowFilter.Condition - */ -class Condition extends \Google\Protobuf\Internal\Message -{ - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - */ - protected $predicate_filter = null; - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - */ - protected $true_filter = null; - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - */ - protected $false_filter = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowFilter $predicate_filter - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * @type \Google\Cloud\Bigtable\V2\RowFilter $true_filter - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * @type \Google\Cloud\Bigtable\V2\RowFilter $false_filter - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getPredicateFilter() - { - return $this->predicate_filter; - } - - public function hasPredicateFilter() - { - return isset($this->predicate_filter); - } - - public function clearPredicateFilter() - { - unset($this->predicate_filter); - } - - /** - * If `predicate_filter` outputs any cells, then `true_filter` will be - * evaluated on the input row. Otherwise, `false_filter` will be evaluated. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter predicate_filter = 1; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setPredicateFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->predicate_filter = $var; - - return $this; - } - - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getTrueFilter() - { - return $this->true_filter; - } - - public function hasTrueFilter() - { - return isset($this->true_filter); - } - - public function clearTrueFilter() - { - unset($this->true_filter); - } - - /** - * The filter to apply to the input row if `predicate_filter` returns any - * results. If not provided, no results will be returned in the true case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter true_filter = 2; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setTrueFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->true_filter = $var; - - return $this; - } - - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - * @return \Google\Cloud\Bigtable\V2\RowFilter|null - */ - public function getFalseFilter() - { - return $this->false_filter; - } - - public function hasFalseFilter() - { - return isset($this->false_filter); - } - - public function clearFalseFilter() - { - unset($this->false_filter); - } - - /** - * The filter to apply to the input row if `predicate_filter` does not - * return any results. If not provided, no results will be returned in the - * false case. - * - * Generated from protobuf field .google.bigtable.v2.RowFilter false_filter = 3; - * @param \Google\Cloud\Bigtable\V2\RowFilter $var - * @return $this - */ - public function setFalseFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->false_filter = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Condition::class, \Google\Cloud\Bigtable\V2\RowFilter_Condition::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php deleted file mode 100644 index 92485f18e91d..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowFilter/Interleave.php +++ /dev/null @@ -1,159 +0,0 @@ -google.bigtable.v2.RowFilter.Interleave - */ -class Interleave extends \Google\Protobuf\Internal\Message -{ - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $filters - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The elements of "filters" all process a copy of the input row, and the - * results are pooled, sorted, and combined into a single output row. - * If multiple cells are produced with the same column and timestamp, - * they will all appear in the output row in an unspecified mutual order. - * Consider the following example, with three filters: - * input row - * | - * ----------------------------------------------------- - * | | | - * f(0) f(1) f(2) - * | | | - * 1: foo,bar,10,x foo,bar,10,z far,bar,7,a - * 2: foo,blah,11,z far,blah,5,x far,blah,5,x - * | | | - * ----------------------------------------------------- - * | - * 1: foo,bar,10,z // could have switched with #2 - * 2: foo,bar,10,x // could have switched with #1 - * 3: foo,blah,11,z - * 4: far,bar,7,a - * 5: far,blah,5,x // identical to #6 - * 6: far,blah,5,x // identical to #5 - * All interleaved filters are executed atomically. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowFilter filters = 1; - * @param array<\Google\Cloud\Bigtable\V2\RowFilter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowFilter::class); - $this->filters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interleave::class, \Google\Cloud\Bigtable\V2\RowFilter_Interleave::class); - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php deleted file mode 100644 index f4782f92295a..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowRange.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.v2.RowRange - */ -class RowRange extends \Google\Protobuf\Internal\Message -{ - protected $start_key; - protected $end_key; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_key_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_key_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_key_open - * Used when giving an exclusive upper bound for the range. - * @type string $end_key_closed - * Used when giving an inclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_closed = 1; - * @return string - */ - public function getStartKeyClosed() - { - return $this->readOneof(1); - } - - public function hasStartKeyClosed() - { - return $this->hasOneof(1); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_closed = 1; - * @param string $var - * @return $this - */ - public function setStartKeyClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_open = 2; - * @return string - */ - public function getStartKeyOpen() - { - return $this->readOneof(2); - } - - public function hasStartKeyOpen() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_key_open = 2; - * @param string $var - * @return $this - */ - public function setStartKeyOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_open = 3; - * @return string - */ - public function getEndKeyOpen() - { - return $this->readOneof(3); - } - - public function hasEndKeyOpen() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_open = 3; - * @param string $var - * @return $this - */ - public function setEndKeyOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_closed = 4; - * @return string - */ - public function getEndKeyClosed() - { - return $this->readOneof(4); - } - - public function hasEndKeyClosed() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_key_closed = 4; - * @param string $var - * @return $this - */ - public function setEndKeyClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartKey() - { - return $this->whichOneof("start_key"); - } - - /** - * @return string - */ - public function getEndKey() - { - return $this->whichOneof("end_key"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php deleted file mode 100644 index 5c8335823bb8..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/RowSet.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.v2.RowSet - */ -class RowSet extends \Google\Protobuf\Internal\Message -{ - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - */ - private $row_keys; - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - */ - private $row_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\RepeatedField $row_keys - * Single rows included in the set. - * @type array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $row_ranges - * Contiguous row ranges included in the set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowKeys() - { - return $this->row_keys; - } - - /** - * Single rows included in the set. - * - * Generated from protobuf field repeated bytes row_keys = 1; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::BYTES); - $this->row_keys = $arr; - - return $this; - } - - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getRowRanges() - { - return $this->row_ranges; - } - - /** - * Contiguous row ranges included in the set. - * - * Generated from protobuf field repeated .google.bigtable.v2.RowRange row_ranges = 2; - * @param array<\Google\Cloud\Bigtable\V2\RowRange>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setRowRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\RowRange::class); - $this->row_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php deleted file mode 100644 index d5fe5e529138..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.bigtable.v2.SampleRowKeysRequest - */ -class SampleRowKeysRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $table_name = ''; - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - */ - protected $app_profile_id = ''; - - /** - * @param string $tableName Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * - * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest - * - * @experimental - */ - public static function build(string $tableName): self - { - return (new self()) - ->setTableName($tableName); - } - - /** - * @param string $tableName Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $appProfileId This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * @return \Google\Cloud\Bigtable\V2\SampleRowKeysRequest - * - * @experimental - */ - public static function buildFromTableNameAppProfileId(string $tableName, string $appProfileId): self - { - return (new self()) - ->setTableName($tableName) - ->setAppProfileId($appProfileId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table_name - * Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * @type string $app_profile_id - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getTableName() - { - return $this->table_name; - } - - /** - * Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * - * Generated from protobuf field string table_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setTableName($var) - { - GPBUtil::checkString($var, True); - $this->table_name = $var; - - return $this; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @return string - */ - public function getAppProfileId() - { - return $this->app_profile_id; - } - - /** - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * - * Generated from protobuf field string app_profile_id = 2; - * @param string $var - * @return $this - */ - public function setAppProfileId($var) - { - GPBUtil::checkString($var, True); - $this->app_profile_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php deleted file mode 100644 index 1c38c831d343..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/SampleRowKeysResponse.php +++ /dev/null @@ -1,137 +0,0 @@ -google.bigtable.v2.SampleRowKeysResponse - */ -class SampleRowKeysResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - */ - protected $row_key = ''; - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - */ - protected $offset_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $row_key - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * @type int|string $offset_bytes - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Bigtable::initOnce(); - parent::__construct($data); - } - - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - * @return string - */ - public function getRowKey() - { - return $this->row_key; - } - - /** - * Sorted streamed sequence of sample row keys in the table. The table might - * have contents before the first row key in the list and after the last one, - * but a key containing the empty string indicates "end of table" and will be - * the last response given, if present. - * Note that row keys in this list may not have ever been written to or read - * from, and users should therefore not make any assumptions about the row key - * structure that are specific to their use case. - * - * Generated from protobuf field bytes row_key = 1; - * @param string $var - * @return $this - */ - public function setRowKey($var) - { - GPBUtil::checkString($var, False); - $this->row_key = $var; - - return $this; - } - - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - * @return int|string - */ - public function getOffsetBytes() - { - return $this->offset_bytes; - } - - /** - * Approximate total storage space used by all rows in the table which precede - * `row_key`. Buffering the contents of all rows between two subsequent - * samples would require space roughly equal to the difference in their - * `offset_bytes` fields. - * - * Generated from protobuf field int64 offset_bytes = 2; - * @param int|string $var - * @return $this - */ - public function setOffsetBytes($var) - { - GPBUtil::checkInt64($var); - $this->offset_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php deleted file mode 100644 index 9a623c62ebaa..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationToken.php +++ /dev/null @@ -1,113 +0,0 @@ -google.bigtable.v2.StreamContinuationToken - */ -class StreamContinuationToken extends \Google\Protobuf\Internal\Message -{ - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - */ - protected $partition = null; - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - */ - protected $token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\StreamPartition $partition - * The partition that this token applies to. - * @type string $token - * An encoded position in the stream to restart reading from. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @return \Google\Cloud\Bigtable\V2\StreamPartition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * The partition that this token applies to. - * - * Generated from protobuf field .google.bigtable.v2.StreamPartition partition = 1; - * @param \Google\Cloud\Bigtable\V2\StreamPartition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\StreamPartition::class); - $this->partition = $var; - - return $this; - } - - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * An encoded position in the stream to restart reading from. - * - * Generated from protobuf field string token = 2; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php deleted file mode 100644 index 471a816ecaeb..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamContinuationTokens.php +++ /dev/null @@ -1,69 +0,0 @@ -google.bigtable.v2.StreamContinuationTokens - */ -class StreamContinuationTokens extends \Google\Protobuf\Internal\Message -{ - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - */ - private $tokens; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $tokens - * List of continuation tokens. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getTokens() - { - return $this->tokens; - } - - /** - * List of continuation tokens. - * - * Generated from protobuf field repeated .google.bigtable.v2.StreamContinuationToken tokens = 1; - * @param array<\Google\Cloud\Bigtable\V2\StreamContinuationToken>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setTokens($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Bigtable\V2\StreamContinuationToken::class); - $this->tokens = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php deleted file mode 100644 index 2efb7f58fd23..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/StreamPartition.php +++ /dev/null @@ -1,82 +0,0 @@ -google.bigtable.v2.StreamPartition - */ -class StreamPartition extends \Google\Protobuf\Internal\Message -{ - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - */ - protected $row_range = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Bigtable\V2\RowRange $row_range - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - * @return \Google\Cloud\Bigtable\V2\RowRange|null - */ - public function getRowRange() - { - return $this->row_range; - } - - public function hasRowRange() - { - return isset($this->row_range); - } - - public function clearRowRange() - { - unset($this->row_range); - } - - /** - * The row range covered by this partition and is specified by - * [`start_key_closed`, `end_key_open`). - * - * Generated from protobuf field .google.bigtable.v2.RowRange row_range = 1; - * @param \Google\Cloud\Bigtable\V2\RowRange $var - * @return $this - */ - public function setRowRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Bigtable\V2\RowRange::class); - $this->row_range = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php deleted file mode 100644 index ddd1bcea30d4..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/TimestampRange.php +++ /dev/null @@ -1,101 +0,0 @@ -google.bigtable.v2.TimestampRange - */ -class TimestampRange extends \Google\Protobuf\Internal\Message -{ - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - */ - protected $start_timestamp_micros = 0; - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - */ - protected $end_timestamp_micros = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $start_timestamp_micros - * Inclusive lower bound. If left empty, interpreted as 0. - * @type int|string $end_timestamp_micros - * Exclusive upper bound. If left empty, interpreted as infinity. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - * @return int|string - */ - public function getStartTimestampMicros() - { - return $this->start_timestamp_micros; - } - - /** - * Inclusive lower bound. If left empty, interpreted as 0. - * - * Generated from protobuf field int64 start_timestamp_micros = 1; - * @param int|string $var - * @return $this - */ - public function setStartTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->start_timestamp_micros = $var; - - return $this; - } - - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - * @return int|string - */ - public function getEndTimestampMicros() - { - return $this->end_timestamp_micros; - } - - /** - * Exclusive upper bound. If left empty, interpreted as infinity. - * - * Generated from protobuf field int64 end_timestamp_micros = 2; - * @param int|string $var - * @return $this - */ - public function setEndTimestampMicros($var) - { - GPBUtil::checkInt64($var); - $this->end_timestamp_micros = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php b/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php deleted file mode 100644 index a3dc913e427c..000000000000 --- a/owl-bot-staging/Bigtable/v2/proto/src/Google/Cloud/Bigtable/V2/ValueRange.php +++ /dev/null @@ -1,183 +0,0 @@ -google.bigtable.v2.ValueRange - */ -class ValueRange extends \Google\Protobuf\Internal\Message -{ - protected $start_value; - protected $end_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $start_value_closed - * Used when giving an inclusive lower bound for the range. - * @type string $start_value_open - * Used when giving an exclusive lower bound for the range. - * @type string $end_value_closed - * Used when giving an inclusive upper bound for the range. - * @type string $end_value_open - * Used when giving an exclusive upper bound for the range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Bigtable\V2\Data::initOnce(); - parent::__construct($data); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_closed = 1; - * @return string - */ - public function getStartValueClosed() - { - return $this->readOneof(1); - } - - public function hasStartValueClosed() - { - return $this->hasOneof(1); - } - - /** - * Used when giving an inclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_closed = 1; - * @param string $var - * @return $this - */ - public function setStartValueClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_open = 2; - * @return string - */ - public function getStartValueOpen() - { - return $this->readOneof(2); - } - - public function hasStartValueOpen() - { - return $this->hasOneof(2); - } - - /** - * Used when giving an exclusive lower bound for the range. - * - * Generated from protobuf field bytes start_value_open = 2; - * @param string $var - * @return $this - */ - public function setStartValueOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_closed = 3; - * @return string - */ - public function getEndValueClosed() - { - return $this->readOneof(3); - } - - public function hasEndValueClosed() - { - return $this->hasOneof(3); - } - - /** - * Used when giving an inclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_closed = 3; - * @param string $var - * @return $this - */ - public function setEndValueClosed($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_open = 4; - * @return string - */ - public function getEndValueOpen() - { - return $this->readOneof(4); - } - - public function hasEndValueOpen() - { - return $this->hasOneof(4); - } - - /** - * Used when giving an exclusive upper bound for the range. - * - * Generated from protobuf field bytes end_value_open = 4; - * @param string $var - * @return $this - */ - public function setEndValueOpen($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getStartValue() - { - return $this->whichOneof("start_value"); - } - - /** - * @return string - */ - public function getEndValue() - { - return $this->whichOneof("end_value"); - } - -} - diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php deleted file mode 100644 index 344954908b4e..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/check_and_mutate_row.php +++ /dev/null @@ -1,71 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the conditional mutation should be - * applied. - */ -function check_and_mutate_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var CheckAndMutateRowResponse $response */ - $response = $bigtableClient->checkAndMutateRow($formattedTableName, $rowKey); - 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - check_and_mutate_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_CheckAndMutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php deleted file mode 100644 index dd1e2e75f991..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/generate_initial_change_stream_partitions.php +++ /dev/null @@ -1,77 +0,0 @@ -/instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function generate_initial_change_stream_partitions_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->generateInitialChangeStreamPartitions($formattedTableName); - - /** @var GenerateInitialChangeStreamPartitionsResponse $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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - generate_initial_change_stream_partitions_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_GenerateInitialChangeStreamPartitions_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php deleted file mode 100644 index 3b92a15bae3c..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_row.php +++ /dev/null @@ -1,75 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the mutation should be applied. - */ -function mutate_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $mutations = [new Mutation()]; - - // Call the API and handle any network failures. - try { - /** @var MutateRowResponse $response */ - $response = $bigtableClient->mutateRow($formattedTableName, $rowKey, $mutations); - 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - mutate_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_MutateRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php deleted file mode 100644 index e96b5809456f..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/mutate_rows.php +++ /dev/null @@ -1,82 +0,0 @@ -setMutations($entriesMutations); - $entries = [$entry,]; - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->mutateRows($formattedTableName, $entries); - - /** @var MutateRowsResponse $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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - mutate_rows_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_MutateRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php deleted file mode 100644 index 4516c26bfca4..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/ping_and_warm.php +++ /dev/null @@ -1,69 +0,0 @@ -/instances/`. Please see - * {@see BigtableClient::instanceName()} for help formatting this field. - */ -function ping_and_warm_sample(string $formattedName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var PingAndWarmResponse $response */ - $response = $bigtableClient->pingAndWarm($formattedName); - 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 = BigtableClient::instanceName('[PROJECT]', '[INSTANCE]'); - - ping_and_warm_sample($formattedName); -} -// [END bigtable_v2_generated_Bigtable_PingAndWarm_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php deleted file mode 100644 index 92c1ca67afd7..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_change_stream.php +++ /dev/null @@ -1,77 +0,0 @@ -/instances//tables/
`. - * Change streaming must be enabled on the table. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function read_change_stream_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->readChangeStream($formattedTableName); - - /** @var ReadChangeStreamResponse $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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - read_change_stream_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_ReadChangeStream_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php deleted file mode 100644 index d3c7f92347aa..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_modify_write_row.php +++ /dev/null @@ -1,79 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - * @param string $rowKey The key of the row to which the read/modify/write rules should be - * applied. - */ -function read_modify_write_row_sample(string $formattedTableName, string $rowKey): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Prepare any non-scalar elements to be passed along with the request. - $rules = [new ReadModifyWriteRule()]; - - // Call the API and handle any network failures. - try { - /** @var ReadModifyWriteRowResponse $response */ - $response = $bigtableClient->readModifyWriteRow($formattedTableName, $rowKey, $rules); - 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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '...'; - - read_modify_write_row_sample($formattedTableName, $rowKey); -} -// [END bigtable_v2_generated_Bigtable_ReadModifyWriteRow_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php deleted file mode 100644 index e9e7b0e07923..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/read_rows.php +++ /dev/null @@ -1,77 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function read_rows_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->readRows($formattedTableName); - - /** @var ReadRowsResponse $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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - read_rows_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_ReadRows_sync] diff --git a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php b/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php deleted file mode 100644 index 394b5ea0cbf4..000000000000 --- a/owl-bot-staging/Bigtable/v2/samples/V2/BigtableClient/sample_row_keys.php +++ /dev/null @@ -1,76 +0,0 @@ -/instances//tables/
`. Please see - * {@see BigtableClient::tableName()} for help formatting this field. - */ -function sample_row_keys_sample(string $formattedTableName): void -{ - // Create a client. - $bigtableClient = new BigtableClient(); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $bigtableClient->sampleRowKeys($formattedTableName); - - /** @var SampleRowKeysResponse $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 -{ - $formattedTableName = BigtableClient::tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - - sample_row_keys_sample($formattedTableName); -} -// [END bigtable_v2_generated_Bigtable_SampleRowKeys_sync] diff --git a/owl-bot-staging/Bigtable/v2/src/V2/BigtableClient.php b/owl-bot-staging/Bigtable/v2/src/V2/BigtableClient.php deleted file mode 100644 index 947870f8e215..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/BigtableClient.php +++ /dev/null @@ -1,34 +0,0 @@ - self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName(string $project, string $instance, string $table): string - { - return self::getPathTemplate('table')->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/instances/{instance} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtable.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Mutates a row atomically based on the output of a predicate Reader filter. - * - * The async variant is {@see BigtableClient::checkAndMutateRowAsync()} . - * - * @param CheckAndMutateRowRequest $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 CheckAndMutateRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function checkAndMutateRow(CheckAndMutateRowRequest $request, array $callOptions = []): CheckAndMutateRowResponse - { - return $this->startApiCall('CheckAndMutateRow', $request, $callOptions)->wait(); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - * - * @param GenerateInitialChangeStreamPartitionsRequest $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 generateInitialChangeStreamPartitions(GenerateInitialChangeStreamPartitionsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('GenerateInitialChangeStreamPartitions', $request, $callOptions); - } - - /** - * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - * - * The async variant is {@see BigtableClient::mutateRowAsync()} . - * - * @param MutateRowRequest $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 MutateRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function mutateRow(MutateRowRequest $request, array $callOptions = []): MutateRowResponse - { - return $this->startApiCall('MutateRow', $request, $callOptions)->wait(); - } - - /** - * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - * - * @param MutateRowsRequest $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 mutateRows(MutateRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('MutateRows', $request, $callOptions); - } - - /** - * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - * - * The async variant is {@see BigtableClient::pingAndWarmAsync()} . - * - * @param PingAndWarmRequest $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 PingAndWarmResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function pingAndWarm(PingAndWarmRequest $request, array $callOptions = []): PingAndWarmResponse - { - return $this->startApiCall('PingAndWarm', $request, $callOptions)->wait(); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - * - * @param ReadChangeStreamRequest $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 readChangeStream(ReadChangeStreamRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadChangeStream', $request, $callOptions); - } - - /** - * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - * - * The async variant is {@see BigtableClient::readModifyWriteRowAsync()} . - * - * @param ReadModifyWriteRowRequest $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 ReadModifyWriteRowResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function readModifyWriteRow(ReadModifyWriteRowRequest $request, array $callOptions = []): ReadModifyWriteRowResponse - { - return $this->startApiCall('ReadModifyWriteRow', $request, $callOptions)->wait(); - } - - /** - * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - * - * @param ReadRowsRequest $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 readRows(ReadRowsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ReadRows', $request, $callOptions); - } - - /** - * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - * - * @param SampleRowKeysRequest $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 sampleRowKeys(SampleRowKeysRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('SampleRowKeys', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/Gapic/BigtableGapicClient.php b/owl-bot-staging/Bigtable/v2/src/V2/Gapic/BigtableGapicClient.php deleted file mode 100644 index f580aea39f96..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/Gapic/BigtableGapicClient.php +++ /dev/null @@ -1,956 +0,0 @@ -tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $rowKey = '...'; - * $response = $bigtableClient->checkAndMutateRow($formattedTableName, $rowKey); - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * Many parameters require resource names to be formatted in a particular way. To - * assist with these names, this class includes a format method for each type of - * name, and additionally a parseName method to extract the individual identifiers - * contained within formatted names that are returned by the API. - * - * This service has a new (beta) implementation. See {@see - * \Google\Cloud\Bigtable\V2\Client\BigtableClient} to use the new surface. - */ -class BigtableGapicClient -{ - use GapicClientTrait; - - /** The name of the service. */ - const SERVICE_NAME = 'google.bigtable.v2.Bigtable'; - - /** The default address of the service. */ - const SERVICE_ADDRESS = 'bigtable.googleapis.com'; - - /** The default port of the service. */ - const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/bigtable.data', - 'https://www.googleapis.com/auth/bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-bigtable.data', - 'https://www.googleapis.com/auth/cloud-bigtable.data.readonly', - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ]; - - private static $instanceNameTemplate; - - private static $tableNameTemplate; - - private static $pathTemplateMap; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/bigtable_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/bigtable_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/bigtable_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/bigtable_rest_client_config.php', - ], - ], - ]; - } - - private static function getInstanceNameTemplate() - { - if (self::$instanceNameTemplate == null) { - self::$instanceNameTemplate = new PathTemplate('projects/{project}/instances/{instance}'); - } - - return self::$instanceNameTemplate; - } - - private static function getTableNameTemplate() - { - if (self::$tableNameTemplate == null) { - self::$tableNameTemplate = new PathTemplate('projects/{project}/instances/{instance}/tables/{table}'); - } - - return self::$tableNameTemplate; - } - - private static function getPathTemplateMap() - { - if (self::$pathTemplateMap == null) { - self::$pathTemplateMap = [ - 'instance' => self::getInstanceNameTemplate(), - 'table' => self::getTableNameTemplate(), - ]; - } - - return self::$pathTemplateMap; - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName($project, $instance) - { - return self::getInstanceNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a table - * resource. - * - * @param string $project - * @param string $instance - * @param string $table - * - * @return string The formatted table resource. - */ - public static function tableName($project, $instance, $table) - { - return self::getTableNameTemplate()->render([ - 'project' => $project, - 'instance' => $instance, - 'table' => $table, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - instance: projects/{project}/instances/{instance} - * - table: projects/{project}/instances/{instance}/tables/{table} - * - * 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($formattedName, $template = null) - { - $templateMap = self::getPathTemplateMap(); - if ($template) { - if (!isset($templateMap[$template])) { - throw new ValidationException("Template name $template does not exist"); - } - - return $templateMap[$template]->match($formattedName); - } - - foreach ($templateMap as $templateName => $pathTemplate) { - try { - return $pathTemplate->match($formattedName); - } catch (ValidationException $ex) { - // Swallow the exception to continue trying other path templates - } - } - - throw new ValidationException("Input did not match any known format. Input: $formattedName"); - } - - /** - * Constructor. - * - * @param array $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'bigtable.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * } - * - * @throws ValidationException - */ - public function __construct(array $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** - * Mutates a row atomically based on the output of a predicate Reader filter. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $rowKey = '...'; - * $response = $bigtableClient->checkAndMutateRow($formattedTableName, $rowKey); - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table to which the conditional mutation - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * @param string $rowKey Required. The key of the row to which the conditional mutation should be - * applied. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type RowFilter $predicateFilter - * The filter to be applied to the contents of the specified row. Depending - * on whether or not any results are yielded, either `true_mutations` or - * `false_mutations` will be executed. If unset, checks that the row contains - * any values at all. - * @type Mutation[] $trueMutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * yields at least one cell when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `false_mutations` is empty, and at most - * 100000. - * @type Mutation[] $falseMutations - * Changes to be atomically applied to the specified row if `predicate_filter` - * does not yield any cells when applied to `row_key`. Entries are applied in - * order, meaning that earlier mutations can be masked by later ones. - * Must contain at least one entry if `true_mutations` is empty, and at most - * 100000. - * @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 \Google\Cloud\Bigtable\V2\CheckAndMutateRowResponse - * - * @throws ApiException if the remote call fails - */ - public function checkAndMutateRow($tableName, $rowKey, array $optionalArgs = []) - { - $request = new CheckAndMutateRowRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $request->setRowKey($rowKey); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - if (isset($optionalArgs['predicateFilter'])) { - $request->setPredicateFilter($optionalArgs['predicateFilter']); - } - - if (isset($optionalArgs['trueMutations'])) { - $request->setTrueMutations($optionalArgs['trueMutations']); - } - - if (isset($optionalArgs['falseMutations'])) { - $request->setFalseMutations($optionalArgs['falseMutations']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('CheckAndMutateRow', CheckAndMutateRowResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Returns the current list of partitions that make up the table's - * change stream. The union of partitions will cover the entire keyspace. - * Partitions can be read with `ReadChangeStream`. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * // Read all responses until the stream is complete - * $stream = $bigtableClient->generateInitialChangeStreamPartitions($formattedTableName); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table from which to get change stream - * partitions. Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function generateInitialChangeStreamPartitions($tableName, array $optionalArgs = []) - { - $request = new GenerateInitialChangeStreamPartitionsRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $requestParamHeaders['table_name'] = $tableName; - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('GenerateInitialChangeStreamPartitions', GenerateInitialChangeStreamPartitionsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Mutates a row atomically. Cells already present in the row are left - * unchanged unless explicitly changed by `mutation`. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $rowKey = '...'; - * $mutations = []; - * $response = $bigtableClient->mutateRow($formattedTableName, $rowKey, $mutations); - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table to which the mutation should be - * applied. Values are of the form - * `projects//instances//tables/
`. - * @param string $rowKey Required. The key of the row to which the mutation should be applied. - * @param Mutation[] $mutations Required. Changes to be atomically applied to the specified row. Entries - * are applied in order, meaning that earlier mutations can be masked by later - * ones. Must contain at least one entry and at most 100000. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @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 \Google\Cloud\Bigtable\V2\MutateRowResponse - * - * @throws ApiException if the remote call fails - */ - public function mutateRow($tableName, $rowKey, $mutations, array $optionalArgs = []) - { - $request = new MutateRowRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $request->setRowKey($rowKey); - $request->setMutations($mutations); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('MutateRow', MutateRowResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Mutates multiple rows in a batch. Each individual row is mutated - * atomically as in MutateRow, but the entire batch is not executed - * atomically. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $entries = []; - * // Read all responses until the stream is complete - * $stream = $bigtableClient->mutateRows($formattedTableName, $entries); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table to which the mutations should be - * applied. - * @param Entry[] $entries Required. The row keys and corresponding mutations to be applied in bulk. - * Each entry is applied as an atomic mutation, but the entries may be - * applied in arbitrary order (even between entries for the same row). - * At least one entry must be specified, and in total the entries can - * contain at most 100000 mutations. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function mutateRows($tableName, $entries, array $optionalArgs = []) - { - $request = new MutateRowsRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $request->setEntries($entries); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('MutateRows', MutateRowsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Warm up associated instance metadata for this connection. - * This call is not required but may be useful for connection keep-alive. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedName = $bigtableClient->instanceName('[PROJECT]', '[INSTANCE]'); - * $response = $bigtableClient->pingAndWarm($formattedName); - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $name Required. The unique name of the instance to check permissions for as well - * as respond. Values are of the form - * `projects//instances/`. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @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 \Google\Cloud\Bigtable\V2\PingAndWarmResponse - * - * @throws ApiException if the remote call fails - */ - public function pingAndWarm($name, array $optionalArgs = []) - { - $request = new PingAndWarmRequest(); - $requestParamHeaders = []; - $request->setName($name); - $nameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', $name, $nameMatches)) { - $requestParamHeaders['name'] = $nameMatches['name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('PingAndWarm', PingAndWarmResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * NOTE: This API is intended to be used by Apache Beam BigtableIO. - * Reads changes from a table's change stream. Changes will - * reflect both user-initiated mutations and mutations that are caused by - * garbage collection. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * // Read all responses until the stream is complete - * $stream = $bigtableClient->readChangeStream($formattedTableName); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table from which to read a change stream. - * Values are of the form - * `projects//instances//tables/
`. - * Change streaming must be enabled on the table. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * Single cluster routing must be configured on the profile. - * @type StreamPartition $partition - * The partition to read changes from. - * @type Timestamp $startTime - * Start reading the stream at the specified timestamp. This timestamp must - * be within the change stream retention period, less than or equal to the - * current time, and after change stream creation, whichever is greater. - * This value is inclusive and will be truncated to microsecond granularity. - * @type StreamContinuationTokens $continuationTokens - * Tokens that describe how to resume reading a stream where reading - * previously left off. If specified, changes will be read starting at the - * the position. Tokens are delivered on the stream as part of `Heartbeat` - * and `CloseStream` messages. - * - * If a single token is provided, the token’s partition must exactly match - * the request’s partition. If multiple tokens are provided, as in the case - * of a partition merge, the union of the token partitions must exactly - * cover the request’s partition. Otherwise, INVALID_ARGUMENT will be - * returned. - * @type Timestamp $endTime - * If specified, OK will be returned when the stream advances beyond - * this time. Otherwise, changes will be continuously delivered on the stream. - * This value is inclusive and will be truncated to microsecond granularity. - * @type Duration $heartbeatDuration - * If specified, the duration between `Heartbeat` messages on the stream. - * Otherwise, defaults to 5 seconds. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function readChangeStream($tableName, array $optionalArgs = []) - { - $request = new ReadChangeStreamRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $requestParamHeaders['table_name'] = $tableName; - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - } - - if (isset($optionalArgs['partition'])) { - $request->setPartition($optionalArgs['partition']); - } - - if (isset($optionalArgs['startTime'])) { - $request->setStartTime($optionalArgs['startTime']); - } - - if (isset($optionalArgs['continuationTokens'])) { - $request->setContinuationTokens($optionalArgs['continuationTokens']); - } - - if (isset($optionalArgs['endTime'])) { - $request->setEndTime($optionalArgs['endTime']); - } - - if (isset($optionalArgs['heartbeatDuration'])) { - $request->setHeartbeatDuration($optionalArgs['heartbeatDuration']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReadChangeStream', ReadChangeStreamResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Modifies a row atomically on the server. The method reads the latest - * existing timestamp and value from the specified columns and writes a new - * entry based on pre-defined read/modify/write rules. The new value for the - * timestamp is the greater of the existing timestamp or the current server - * time. The method returns the new contents of all modified cells. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * $rowKey = '...'; - * $rules = []; - * $response = $bigtableClient->readModifyWriteRow($formattedTableName, $rowKey, $rules); - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table to which the read/modify/write rules - * should be applied. Values are of the form - * `projects//instances//tables/
`. - * @param string $rowKey Required. The key of the row to which the read/modify/write rules should be - * applied. - * @param ReadModifyWriteRule[] $rules Required. Rules specifying how the specified row's contents are to be - * transformed into writes. Entries are applied in order, meaning that earlier - * rules will affect the results of later ones. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @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 \Google\Cloud\Bigtable\V2\ReadModifyWriteRowResponse - * - * @throws ApiException if the remote call fails - */ - public function readModifyWriteRow($tableName, $rowKey, $rules, array $optionalArgs = []) - { - $request = new ReadModifyWriteRowRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $request->setRowKey($rowKey); - $request->setRules($rules); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReadModifyWriteRow', ReadModifyWriteRowResponse::class, $optionalArgs, $request)->wait(); - } - - /** - * Streams back the contents of all requested rows in key order, optionally - * applying the same Reader filter to each. Depending on their size, - * rows and cells may be broken up across multiple responses, but - * atomicity of each row will still be preserved. See the - * ReadRowsResponse documentation for details. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * // Read all responses until the stream is complete - * $stream = $bigtableClient->readRows($formattedTableName); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table from which to read. - * Values are of the form - * `projects//instances//tables/
`. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type RowSet $rows - * The row keys and/or ranges to read sequentially. If not specified, reads - * from all rows. - * @type RowFilter $filter - * The filter to apply to the contents of the specified row(s). If unset, - * reads the entirety of each row. - * @type int $rowsLimit - * The read will stop after committing to N rows' worth of results. The - * default (zero) is to return all results. - * @type int $requestStatsView - * The view into RequestStats, as described above. - * For allowed values, use constants defined on {@see \Google\Cloud\Bigtable\V2\ReadRowsRequest\RequestStatsView} - * @type bool $reversed - * Experimental API - Please note that this API is currently experimental - * and can change in the future. - * - * Return rows in lexiographical descending order of the row keys. The row - * contents will not be affected by this flag. - * - * Example result set: - * - * [ - * {key: "k2", "f:col1": "v1", "f:col2": "v1"}, - * {key: "k1", "f:col1": "v2", "f:col2": "v2"} - * ] - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function readRows($tableName, array $optionalArgs = []) - { - $request = new ReadRowsRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - if (isset($optionalArgs['rows'])) { - $request->setRows($optionalArgs['rows']); - } - - if (isset($optionalArgs['filter'])) { - $request->setFilter($optionalArgs['filter']); - } - - if (isset($optionalArgs['rowsLimit'])) { - $request->setRowsLimit($optionalArgs['rowsLimit']); - } - - if (isset($optionalArgs['requestStatsView'])) { - $request->setRequestStatsView($optionalArgs['requestStatsView']); - } - - if (isset($optionalArgs['reversed'])) { - $request->setReversed($optionalArgs['reversed']); - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('ReadRows', ReadRowsResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } - - /** - * Returns a sample of row keys in the table. The returned row keys will - * delimit contiguous sections of the table of approximately equal size, - * which can be used to break up the data for distributed tasks like - * mapreduces. - * - * Sample code: - * ``` - * $bigtableClient = new BigtableClient(); - * try { - * $formattedTableName = $bigtableClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - * // Read all responses until the stream is complete - * $stream = $bigtableClient->sampleRowKeys($formattedTableName); - * foreach ($stream->readAll() as $element) { - * // doSomethingWith($element); - * } - * } finally { - * $bigtableClient->close(); - * } - * ``` - * - * @param string $tableName Required. The unique name of the table from which to sample row keys. - * Values are of the form - * `projects//instances//tables/
`. - * @param array $optionalArgs { - * Optional. - * - * @type string $appProfileId - * This value specifies routing for replication. If not specified, the - * "default" application profile will be used. - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return \Google\ApiCore\ServerStream - * - * @throws ApiException if the remote call fails - */ - public function sampleRowKeys($tableName, array $optionalArgs = []) - { - $request = new SampleRowKeysRequest(); - $requestParamHeaders = []; - $request->setTableName($tableName); - $tableNameMatches = []; - if (preg_match('/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', $tableName, $tableNameMatches)) { - $requestParamHeaders['table_name'] = $tableNameMatches['table_name']; - } - - if (isset($optionalArgs['appProfileId'])) { - $request->setAppProfileId($optionalArgs['appProfileId']); - $requestParamHeaders['app_profile_id'] = $optionalArgs['appProfileId']; - } - - $requestParams = new RequestParamsHeaderDescriptor($requestParamHeaders); - $optionalArgs['headers'] = isset($optionalArgs['headers']) ? array_merge($requestParams->getHeader(), $optionalArgs['headers']) : $requestParams->getHeader(); - return $this->startCall('SampleRowKeys', SampleRowKeysResponse::class, $optionalArgs, $request, Call::SERVER_STREAMING_CALL); - } -} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 38b379d3786b..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.bigtable.v2", - "libraryPackage": "Google\\Cloud\\Bigtable\\V2", - "services": { - "Bigtable": { - "clients": { - "grpc": { - "libraryClient": "BigtableGapicClient", - "rpcs": { - "CheckAndMutateRow": { - "methods": [ - "checkAndMutateRow" - ] - }, - "GenerateInitialChangeStreamPartitions": { - "methods": [ - "generateInitialChangeStreamPartitions" - ] - }, - "MutateRow": { - "methods": [ - "mutateRow" - ] - }, - "MutateRows": { - "methods": [ - "mutateRows" - ] - }, - "PingAndWarm": { - "methods": [ - "pingAndWarm" - ] - }, - "ReadChangeStream": { - "methods": [ - "readChangeStream" - ] - }, - "ReadModifyWriteRow": { - "methods": [ - "readModifyWriteRow" - ] - }, - "ReadRows": { - "methods": [ - "readRows" - ] - }, - "SampleRowKeys": { - "methods": [ - "sampleRowKeys" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json deleted file mode 100644 index 15b71e3eaaf7..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_client_config.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "interfaces": { - "google.bigtable.v2.Bigtable": { - "retry_codes": { - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "non_idempotent": [] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 20000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 20000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CheckAndMutateRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GenerateInitialChangeStreamPartitions": { - "timeout_millis": 60000 - }, - "MutateRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "MutateRows": { - "timeout_millis": 60000 - }, - "PingAndWarm": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ReadChangeStream": { - "timeout_millis": 60000 - }, - "ReadModifyWriteRow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ReadRows": { - "timeout_millis": 60000 - }, - "SampleRowKeys": { - "timeout_millis": 60000 - } - } - } - } -} diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php deleted file mode 100644 index 7e237a7eb312..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_descriptor_config.php +++ /dev/null @@ -1,198 +0,0 @@ - [ - 'google.bigtable.v2.Bigtable' => [ - 'CheckAndMutateRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\CheckAndMutateRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'GenerateInitialChangeStreamPartitions' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\GenerateInitialChangeStreamPartitionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'MutateRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\MutateRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'PingAndWarm' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\PingAndWarmResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'ReadChangeStream' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadChangeStreamResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadModifyWriteRow' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadModifyWriteRowResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'ReadRows' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\ReadRowsResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'SampleRowKeys' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Bigtable\V2\SampleRowKeysResponse', - 'headerParams' => [ - [ - 'keyName' => 'table_name', - 'fieldAccessors' => [ - 'getTableName', - ], - 'matchers' => [ - '/^(?projects\/[^\/]+\/instances\/[^\/]+\/tables\/[^\/]+)$/', - ], - ], - [ - 'keyName' => 'app_profile_id', - 'fieldAccessors' => [ - 'getAppProfileId', - ], - ], - ], - ], - 'templateMap' => [ - 'instance' => 'projects/{project}/instances/{instance}', - 'table' => 'projects/{project}/instances/{instance}/tables/{table}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php b/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php deleted file mode 100644 index d8108bb45931..000000000000 --- a/owl-bot-staging/Bigtable/v2/src/V2/resources/bigtable_rest_client_config.php +++ /dev/null @@ -1,116 +0,0 @@ - [ - 'google.bigtable.v2.Bigtable' => [ - 'CheckAndMutateRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:checkAndMutateRow', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'GenerateInitialChangeStreamPartitions' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:generateInitialChangeStreamPartitions', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRow', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'MutateRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:mutateRows', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'PingAndWarm' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/instances/*}:ping', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ReadChangeStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readChangeStream', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadModifyWriteRow' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readModifyWriteRow', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'ReadRows' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:readRows', - 'body' => '*', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - 'SampleRowKeys' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{table_name=projects/*/instances/*/tables/*}:sampleRowKeys', - 'placeholders' => [ - 'table_name' => [ - 'getters' => [ - 'getTableName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/BigtableClientTest.php b/owl-bot-staging/Bigtable/v2/tests/Unit/V2/BigtableClientTest.php deleted file mode 100644 index bbbc5860950d..000000000000 --- a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/BigtableClientTest.php +++ /dev/null @@ -1,696 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableClient($options); - } - - /** @test */ - public function checkAndMutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $predicateMatched = true; - $expectedResponse = new CheckAndMutateRowResponse(); - $expectedResponse->setPredicateMatched($predicateMatched); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $response = $gapicClient->checkAndMutateRow($formattedTableName, $rowKey); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkAndMutateRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - try { - $gapicClient->checkAndMutateRow($formattedTableName, $rowKey); - // 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 generateInitialChangeStreamPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($formattedTableName); - $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.bigtable.v2.Bigtable/GenerateInitialChangeStreamPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateInitialChangeStreamPartitionsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($formattedTableName); - $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 mutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - $response = $gapicClient->mutateRow($formattedTableName, $rowKey, $mutations); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/MutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getMutations(); - $this->assertProtobufEquals($mutations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - try { - $gapicClient->mutateRow($formattedTableName, $rowKey, $mutations); - // 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 mutateRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $serverStream = $gapicClient->mutateRows($formattedTableName, $entries); - $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.bigtable.v2.Bigtable/MutateRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $serverStream = $gapicClient->mutateRows($formattedTableName, $entries); - $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 pingAndWarmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PingAndWarmResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $response = $gapicClient->pingAndWarm($formattedName); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/PingAndWarm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pingAndWarmExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - try { - $gapicClient->pingAndWarm($formattedName); - // 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 readChangeStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->readChangeStream($formattedTableName); - $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.bigtable.v2.Bigtable/ReadChangeStream', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readChangeStreamExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->readChangeStream($formattedTableName); - $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 readModifyWriteRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadModifyWriteRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - $response = $gapicClient->readModifyWriteRow($formattedTableName, $rowKey, $rules); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ReadModifyWriteRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getRules(); - $this->assertProtobufEquals($rules, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readModifyWriteRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - try { - $gapicClient->readModifyWriteRow($formattedTableName, $rowKey, $rules); - // 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 readRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $lastScannedRowKey = '-126'; - $expectedResponse = new ReadRowsResponse(); - $expectedResponse->setLastScannedRowKey($lastScannedRowKey); - $transport->addResponse($expectedResponse); - $lastScannedRowKey2 = '-75'; - $expectedResponse2 = new ReadRowsResponse(); - $expectedResponse2->setLastScannedRowKey($lastScannedRowKey2); - $transport->addResponse($expectedResponse2); - $lastScannedRowKey3 = '-74'; - $expectedResponse3 = new ReadRowsResponse(); - $expectedResponse3->setLastScannedRowKey($lastScannedRowKey3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->readRows($formattedTableName); - $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.bigtable.v2.Bigtable/ReadRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->readRows($formattedTableName); - $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 sampleRowKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowKey = '122'; - $offsetBytes = 889884095; - $expectedResponse = new SampleRowKeysResponse(); - $expectedResponse->setRowKey($rowKey); - $expectedResponse->setOffsetBytes($offsetBytes); - $transport->addResponse($expectedResponse); - $rowKey2 = '-83'; - $offsetBytes2 = 480126386; - $expectedResponse2 = new SampleRowKeysResponse(); - $expectedResponse2->setRowKey($rowKey2); - $expectedResponse2->setOffsetBytes($offsetBytes2); - $transport->addResponse($expectedResponse2); - $rowKey3 = '-82'; - $offsetBytes3 = 480126387; - $expectedResponse3 = new SampleRowKeysResponse(); - $expectedResponse3->setRowKey($rowKey3); - $expectedResponse3->setOffsetBytes($offsetBytes3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->sampleRowKeys($formattedTableName); - $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.bigtable.v2.Bigtable/SampleRowKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sampleRowKeysExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $serverStream = $gapicClient->sampleRowKeys($formattedTableName); - $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()); - } -} diff --git a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php b/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php deleted file mode 100644 index 7106025be3cb..000000000000 --- a/owl-bot-staging/Bigtable/v2/tests/Unit/V2/Client/BigtableClientTest.php +++ /dev/null @@ -1,786 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return BigtableClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new BigtableClient($options); - } - - /** @test */ - public function checkAndMutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $predicateMatched = true; - $expectedResponse = new CheckAndMutateRowResponse(); - $expectedResponse->setPredicateMatched($predicateMatched); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - $response = $gapicClient->checkAndMutateRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function checkAndMutateRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - try { - $gapicClient->checkAndMutateRow($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 generateInitialChangeStreamPartitionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new GenerateInitialChangeStreamPartitionsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateInitialChangeStreamPartitionsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($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.bigtable.v2.Bigtable/GenerateInitialChangeStreamPartitions', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateInitialChangeStreamPartitionsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new GenerateInitialChangeStreamPartitionsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->generateInitialChangeStreamPartitions($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 mutateRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - $request = (new MutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - $response = $gapicClient->mutateRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/MutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getMutations(); - $this->assertProtobufEquals($mutations, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $mutations = []; - $request = (new MutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setMutations($mutations); - try { - $gapicClient->mutateRow($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 mutateRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new MutateRowsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new MutateRowsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $request = (new MutateRowsRequest()) - ->setTableName($formattedTableName) - ->setEntries($entries); - $serverStream = $gapicClient->mutateRows($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.bigtable.v2.Bigtable/MutateRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function mutateRowsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $entries = []; - $request = (new MutateRowsRequest()) - ->setTableName($formattedTableName) - ->setEntries($entries); - $serverStream = $gapicClient->mutateRows($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 pingAndWarmTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new PingAndWarmResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new PingAndWarmRequest()) - ->setName($formattedName); - $response = $gapicClient->pingAndWarm($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/PingAndWarm', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function pingAndWarmExceptionTest() - { - $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->instanceName('[PROJECT]', '[INSTANCE]'); - $request = (new PingAndWarmRequest()) - ->setName($formattedName); - try { - $gapicClient->pingAndWarm($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 readChangeStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ReadChangeStreamResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadChangeStreamRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readChangeStream($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.bigtable.v2.Bigtable/ReadChangeStream', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readChangeStreamExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadChangeStreamRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readChangeStream($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 readModifyWriteRowTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReadModifyWriteRowResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - $request = (new ReadModifyWriteRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setRules($rules); - $response = $gapicClient->readModifyWriteRow($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.bigtable.v2.Bigtable/ReadModifyWriteRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $actualValue = $actualRequestObject->getRules(); - $this->assertProtobufEquals($rules, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readModifyWriteRowExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $rules = []; - $request = (new ReadModifyWriteRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey) - ->setRules($rules); - try { - $gapicClient->readModifyWriteRow($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 readRowsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $lastScannedRowKey = '-126'; - $expectedResponse = new ReadRowsResponse(); - $expectedResponse->setLastScannedRowKey($lastScannedRowKey); - $transport->addResponse($expectedResponse); - $lastScannedRowKey2 = '-75'; - $expectedResponse2 = new ReadRowsResponse(); - $expectedResponse2->setLastScannedRowKey($lastScannedRowKey2); - $transport->addResponse($expectedResponse2); - $lastScannedRowKey3 = '-74'; - $expectedResponse3 = new ReadRowsResponse(); - $expectedResponse3->setLastScannedRowKey($lastScannedRowKey3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadRowsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readRows($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.bigtable.v2.Bigtable/ReadRows', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function readRowsExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new ReadRowsRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->readRows($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 sampleRowKeysTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $rowKey = '122'; - $offsetBytes = 889884095; - $expectedResponse = new SampleRowKeysResponse(); - $expectedResponse->setRowKey($rowKey); - $expectedResponse->setOffsetBytes($offsetBytes); - $transport->addResponse($expectedResponse); - $rowKey2 = '-83'; - $offsetBytes2 = 480126386; - $expectedResponse2 = new SampleRowKeysResponse(); - $expectedResponse2->setRowKey($rowKey2); - $expectedResponse2->setOffsetBytes($offsetBytes2); - $transport->addResponse($expectedResponse2); - $rowKey3 = '-82'; - $offsetBytes3 = 480126387; - $expectedResponse3 = new SampleRowKeysResponse(); - $expectedResponse3->setRowKey($rowKey3); - $expectedResponse3->setOffsetBytes($offsetBytes3); - $transport->addResponse($expectedResponse3); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new SampleRowKeysRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->sampleRowKeys($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.bigtable.v2.Bigtable/SampleRowKeys', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sampleRowKeysExceptionTest() - { - $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 - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $request = (new SampleRowKeysRequest()) - ->setTableName($formattedTableName); - $serverStream = $gapicClient->sampleRowKeys($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 checkAndMutateRowAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $predicateMatched = true; - $expectedResponse = new CheckAndMutateRowResponse(); - $expectedResponse->setPredicateMatched($predicateMatched); - $transport->addResponse($expectedResponse); - // Mock request - $formattedTableName = $gapicClient->tableName('[PROJECT]', '[INSTANCE]', '[TABLE]'); - $rowKey = '122'; - $request = (new CheckAndMutateRowRequest()) - ->setTableName($formattedTableName) - ->setRowKey($rowKey); - $response = $gapicClient->checkAndMutateRowAsync($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.bigtable.v2.Bigtable/CheckAndMutateRow', $actualFuncCall); - $actualValue = $actualRequestObject->getTableName(); - $this->assertProtobufEquals($formattedTableName, $actualValue); - $actualValue = $actualRequestObject->getRowKey(); - $this->assertProtobufEquals($rowKey, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}